Bounce between two exact points

I’ve just been playing around physics codes for a while but i wonder if its possible to make an object bounce between 2 exact points. For example i want a ball to bounce from point A (x=10, y=0, z=0) and land exactly on point B (x=40, y=0, z=0).

Okay, i totally forgot about this but I stumbled upon a solution here => Math problem. For anyone who might need it.