there have been other topics for that. The equations for the motion of a falling projectile is this:
y1=y0+vy*t+0.5*gravity*t^2
x1=X0+vx*t
X0,y0 is the start position
X1,y1 is the end position
Vx,Vy is the velocity
t is time
If you pick a time and then solve those equations for vx and vy that would do it.
I think it's referred to elsewhere as predictive aiming. You could also Google kinematics for more tutorials about the equations used.