# What's the reference frame for displacement when calculating work? [duplicate]

I know that one way to calculate work is force*(displacement in the direction of the force). But what reference frame does that displacement value come from? One where the object starts at rest?

Here's an example to clarify. Imagine two identical rockets in space, each with the same amount of fuel. At $t=0$, the first rocket is at rest in the observer's reference frame, and the second rocket is already moving forward at some speed. They both start their engines and burn out all of their fuel, exerting identical, constant forces. When their engines stop, the second rocket has traveled farther than the first, despite both having burned the same fuel and therefore done the same work/energy.

So in that situation, what reference frame would you use for each rocket to measure its displacement? The two rockets do indeed do the same amount of work, right? Am I misunderstanding something?