Question: > 
> A ball of mass $m$ is attached to a spring that is attached to a heavy moving cart (mass of cart $M >>$ mass of ball $m$) moving at velocity $V0$. The compressed spring with known spring constant $k$ is released and the ball is fired forward. The ball then strikes a similar spring with the same spring constant attached to a wall (i.e. the spring is attached to a heavy immovable object). How far does the spring attached to the wall compress?
> 
> 
> 

Is it just a matter of conservation of energy?
Ek(moving ball) + E(spring potential-for the moving spring) = E(spring potential-fixed spring)

Or does the motion of the initial spring somehow affect how much energy it can transmit to the ball. 

Or, in the frame of reference of the moving spring, can you simply calculate the velocity of the ball from E(spring potential) = Ek and add that to the initial velocity of the spring/ball and then use that new velocity to calculate the Ek and hence the energy transferred to the fixed spring and hence the compression of the spring. 

Depending on how you approach this problem you get different answers.

Answer: 
> 
> Or does the motion of the initial spring somehow affect how much energy it can transmit to the ball.
> 
> 
> 

The motion of the heavy cart must also be included in the calculation. During the launch of the ball the heavy cart is both moving and exerting a force in the direction of motion on the spring therefore work is done on the spring. So the force adds energy to the spring which is then transferred to the ball. So the total mechanical energy delivered to the receiving spring increases with increasing speed of the heavy cart. The formula that you wrote for energy is on the right track, but incomplete.
In Newtonian mechanics, the total mechanical energy is not frame-independent. If you calculate the energy of the ball/cart/spring/spring system in the rest frame of the walls of the room you get one value. If you calculate it in the rest frame of the cart you get a different value. That means you can't directly use the energy calculated in the cart frame as the value in the walls-of-room frame.

If you want to use the mechanical energy of the cart frame, you have to realize that the spring attached to the wall is moving toward the ball which affects the maximum compression of the spring.