You could try googling '1st law of thermodynamics open system'. (I found this: http://www.tech.plym.ac.uk/sme/ther103/ther103-first%20law%20open%20systems.pdf.)
The equation in the center of page 5 pretty much summarizes it all. Should be pretty easy to understand if you're familiar with...
Could it be something like:
m d(x1 + x2)/dt^2 = F - d dx2/dt
c x1 = d dx2/dtAs in:
Mass x acceleration = external force - counteracting damper force
Spring force = damper force (= reaction force on the fixed 'wall')
With the origin of the X axis at the fixed wall (duh) and its plus direction...