The object (ball) was not at rest, it was moving and therefore had kinetic energy. It also had potential energy in its elasticity (the coefficient of restitution indicates to what extent this is utilised by the rebound).
1) A body on a horizontal plane is travelling along a straight line from A to B.
2)It encounters something solid (B)
3) and then travels in the opposite direction towards A (ie rebounds).
In step 1 it was moving towards B. In step 3 it is moving towards A. In what direction is it moving in step 2?
Ball bouncing from massive wall.
Most physics textbooks consider the case of a ball bouncing from a massive object, say the floor, or a wall. They consider the case where the collision is nearly or totally elastic. In the totally elastic collision, the ball loses no kinetic energy in the collision, so its speed after collision is the same as before the collision. The student thinks, "Of course that must be the case, because of conservation of energy." Seldom does the textbook, or the student, consider how conservation of momentum is satisfied in this problem. They should, for the analysis is instructive. Analyzing this may also give some insight into why energy, momentum and the conservation laws took so long to be formulated, since the concepts are subtle.
Consider a ball of mass m colliding elastically with a stationary object of larger mass M. Draw the picture before and after the collision. The conservation equations are:
mv1 = mv2 + MV2
(1/2)mv12 = (1/2)mv22 + (1/2)MV2
where v1 is the initial velocity of the smaller ball, v2 is its final velocity after collision, and V2 is the velocity of the larger mass after the collision.
Multiply the energy equation by 2 to eliminate the (1/2) factors.
mv12 = mv22 + MV2
Divide this by m on both sides.
v12 = v22 + (M/m)V22
v12 - v22 = (M/m)V22
Divide the momentum equation by m on both sides.
v1 = v2 + (M/m)V2
Rearrange and square both sides.
(v1 - v2)2 = (M/m)2V22
Multiply Eq.  by (M/m) and combine with  to eliminate V22.
(M/m)(v12 - v22) = (v1 - v2)2
Multiply both sides by (m/M)
(v12 - v22) = (m/M)(v1 - v2)2
Take the limit as (m/M) goes to zero.
(v12 - v22) = 0
So one solution of this is v1 = -v2. Another solution is v1 = v2, corresponding to the case where the two objects do not collide at all.
One can graph the values of v2 and V2 against (m/M) and show that as (m/M) goes to zero, the values of the final velocities do indeed smoothly go to the limiting case values. In words, the reason this can happen is that kinetic energy is a scalar, and momentum is a vector, and kinetic energy varies as the square of the speed, while momentum varies as only the first power of speed. Therefore the quantity momentum/energy varies with speed as (1/v). So when v goes to zero, the momentum/energy can be infinite.
Those who have had calculus will recognize that this is a case where an indeterminate form arises when you take the limit of the value of momentum of a body whose mass increases to infinity.
Do elastic collisions actually exist in reality? Anywhere on earth? atomic or sub-atomic level?
So, if I throw tennis ball at a wall, obviously the ball pushes against the wall and wall pushes against the ball?
so obviously, wall has more momentum, after having collided with the ball, compared to the wall momentum before having collided with the ball? (ball's force against wall, and wall's force against ball)
But of course this is beside the point indeed.
so it seems sensible, from Newtonian point of view, that ball's momentum before impact, is the same as ball's momentum after impact + wall's momentum after impact.
What causes elastic collisions? The elastic quantity of a collision, the efficiency if you will?
Obviously it would make sense, the ball actually pushes the wall back, but the effect is almost unmeasurable. Wall is built upon foundations to the ground etc...
If you played golf and the surface of the course was completely elastic, always providing elastic collision with a bouncing ball, I suppose your teeshot with a driver would never stop bouncing?