As the wall is heavy so after collison it will continue to move with the same velocity `u_(2)`. Relative velocity of separation is equal to relative velocity of approach. Hence,
`v_(1)-v_(2)=e(u_(1)-u_(2))`
`impliesv_(1)(-u_(2))=-e[u_(1)-(-u_(2))]`
`implies v_(1)=-e(u_(1)+u_(2))-u_(2)`
In case of perfectly elastic collision `e=1`
`v_(1)=-u_(1)-u_(2)-u_(3)=-(u_(1)+2u_(2))`
Negative sign indicates backward direction.