Projectile motion - calculate landing angle 
A projectile is launched at a $45^\circ$ angle, aiming for a target at a distance of 15 feet  away from, and $2$ feet below the starting position.

I'm looking for equations to determine:


*

*The initial velocity of the projectile required to hit the target

*The angle at which the projectile hits the target


I'm particularly interested in learning if there are equations to solve this, as I'm interested in plugging in different distance/height offsets in the future.
 A: We can first find the angle since the initial and final velocities are not given, while the initial displacement are given as X = Y = 0 and the final displacement as X = 4.57 m and Y = 0.61 m. 
The goal is to eliminate the initial unknown velocities where
$$v_x = v_i\cos(\theta)$$
$$v_y = v_i\sin(\theta)$$
To do this we use equations
$$x = v_i\cos(\theta)t$$
$$y = v_i\sin(\theta)t-\frac12gt^2$$
Substituting for $v_i$ we get have
$$y = \tan(\theta)x-\frac 12 g\left(\frac x{v_i\cos\theta}\right)^2$$
We can use this equation to solve for $\theta$ which is the angle at which the target is hit.
Given $\theta$ we can find $v_i$ using $$y = v_i\sin(\theta)t-\frac12gt^2$$
A: Start with the kinematics in x and y coordinates
$$\begin{aligned} x &= \frac{v}{\sqrt{2}} t \\ y & = \frac{v}{\sqrt{2}} t - \frac{1}{2} g t^2 \end{aligned}$$
To hit the target at $x$ you need $t =\frac{x \sqrt{2}}{v}$ time. At this time the vertical position is
$$ y = \frac{v}{\sqrt{2}} \left( \frac{x\sqrt{2}}{v} \right) - \frac{1}{2} g \left( \frac{x \sqrt{2}}{v} \right)^2 = x - \frac{g x^2}{v^2} $$
Solve the above for $v$ the initial velocity.
Once you have the initial velocity calculate the slope by calculating the velocity components in the x and y directions as a function of time.
$$\begin{align} \dot{x}(t) &= \frac{v}{\sqrt{2}} \\ \dot{y} (t)&= \frac{v}{\sqrt{2}} - g t \end{align}$$
and $$\mbox{(slope)} = \frac{\dot{y}}{\dot{x}} = 1 - \frac{g t \sqrt{2}}{v}$$
