A question on the conservation of energy between two objects. A wedge of mass $M$ rests on a smooth horizontal surface. The face of the wedge is a smooth plane inclined at an angle α to the horizontal. A particle of mass $kM$ slides down the face of the wedge, starting from rest. At a later time $t$, the speed of the wedge is $V$, the speed  of the particle $v$ and the
angle of the velocity of the particle to the horizontal β. 
The solution states that conservation of energy gives


*

*$mgy = {m \over 2} v^2 + {m \over 2} V^2$.


I don't understand how intuitively this is true. I would have thought, for the particle, $mgy = {m \over 2} v^2$ and then for the wedge the horizontal force on it would be the force doing the work and be the thing producing ${m \over 2} V^2$. So the equation I get would be similar to • but the left hand side of the equation would have the work done by the horizontal force on the wedge.
I have only ever done conservation of energy with a single particle, never when two are interacting, so sorry if the question is confused. 
Any help would be appreciated! 
 A: At the instant before things start moving, the wedge is on the horizontal surface.
At time $t$ the wedge is still on the horizontal surface.
So the wedge is at the same height in the "before" and "after" pictures,
therefore it has not gained or lost any potential energy.
But its kinetic energy "before" was zero, and now it is $\frac 12 MV^2$.
So where did that kinetic energy come from?
The answer is that the kinetic energy came from the force of the 
particle against the inclined surface of the wedge. Since that force is
not perpendicular to the horizontal surface, it pushes the wedge aside.
But in pushing the wedge aside, the particle does work, thereby expending
energy. Where did it get that energy? It got the energy by falling,
that is, it used some of its potential energy to push the wedge.
The energy it used to push the wedge is no longer available to be
invested in the particle's own kinetic energy.
That's what we mean by conservation of energy. If you observe kinetic energy
somewhere in the system at time $t$, it had to come from somewhere where it
existed at time zero.
A: Since at the initial condition, the particle & the wedge are in the state of rest (both have zero velocity) 
Now, taking the horizontal line as the reference line, 
The total energy of the system (particle +wedge) in initial condition is $$E_1=[\text{P.E. (potential energy) of particle}+\text{K.E. (kinetic energy) of particle}]+[\text{P.E. (potential energy) of wedge}+\text{K.E. (kinetic energy) of wedge}]$$  $$=[mgy+0]+[0+0]=mgy$$ 
Where, $y$ is the vertical height of particle from the horizontal (reference) line in initial state of rest. 
Now, at any time $t$, the particle with mass $m$ is moving with the velocity $v$   &  the particle with mass $M$ is moving with the velocity $V$
Hence, the total energy of the system (particle +wedge) at the time $t$ is $$E_2=[\text{P.E. (potential energy) of particle}+\text{K.E. (kinetic energy) of particle}]+[\text{P.E. (potential energy) of wedge}+\text{K.E. (kinetic energy) of wedge}]$$  $$=\left[0+\frac{1}{2}mv^2\right]+\left[0+\frac{1}{2}MV^2\right]=\frac{1}{2}mv^2+\frac{1}{2}MV^2$$ 
Now, neglecting the losses, the total energy of the system (particle +wedge) by must be constant according to the law of conservation of the energy hence 
$$E_1=E_2$$ $$mgy=\frac{1}{2}mv^2+\frac{1}{2}MV^2$$
