considering time in seconds the position of the ball will be, disregarding attrition
in 'y' you have to account for the gravity.Code:| x = x_initial + v_x * time pos(t) = | | y = y_initial + v_y * time + 9.8 * time^2 / 2
Then you have to solve a system of equations. You know the final position (x, y) and the initial position (x, y). 2 variables remain (vx, vy) and 2 equations. Solve the system.