You are right, we don't.
Take the point at the top of the building and closest to the point of projection as
![](https://latex.codecogs.com/png.latex?\bg_white T)
. Taking the projection as from
![](https://latex.codecogs.com/png.latex?\bg_white M(0, 2))
, then
![](https://latex.codecogs.com/png.latex?\bg_white T)
is
![](https://latex.codecogs.com/png.latex?\bg_white (20, 15))
. If we require the projectile to pass through
![](https://latex.codecogs.com/png.latex?\bg_white T)
, we will get a quadratic equation in
![](https://latex.codecogs.com/png.latex?\bg_white \tan \theta)
that yields two angles,
![](https://latex.codecogs.com/png.latex?\bg_white \alpha_1)
and
![](https://latex.codecogs.com/png.latex?\bg_white \alpha_2)
where
![](https://latex.codecogs.com/png.latex?\bg_white \alpha_1 > \alpha_2)
. Firing the projectile at
![](https://latex.codecogs.com/png.latex?\bg_white \theta = \alpha_1)
corresponds to the given diagram, with the projectile rising to a maximum height and then passing through
![](https://latex.codecogs.com/png.latex?\bg_white T)
on its descent. Firing at
![](https://latex.codecogs.com/png.latex?\bg_white \theta = \alpha_2)
corresponds to the projectile passing through
![](https://latex.codecogs.com/png.latex?\bg_white T)
as it ascends and then continuing on to reach its maximum height. For any angle
![](https://latex.codecogs.com/png.latex?\bg_white \alpha_1 > \theta > \alpha_2)
, when the projectile has travelled a distance of
![](https://latex.codecogs.com/png.latex?\bg_white x = 20)
m horizontally, it will have a height
![](https://latex.codecogs.com/png.latex?\bg_white h)
such that it is some distance above the leading edge of the building,
![](https://latex.codecogs.com/png.latex?\bg_white h = y - 15 > 0)
.
If we assume that the depth / width of the building in our horizontal direction is great relative to the scale of the motion, any angle
![](https://latex.codecogs.com/png.latex?\bg_white \alpha_1 > \theta > \alpha_2)
will result in a roof landing. If it is not, then you are correct, the angle needs to be further constrained to ensure a roof landing, but we also need further information to find a solution.
If you think it is appropriate, you could examine what is the maximum possible range for a landing on the roof and then consider whether this is reasonable for a roof size. You could also examine whether the angles near
![](https://latex.codecogs.com/png.latex?\bg_white \alpha_1 > \theta)
or those near
![](https://latex.codecogs.com/png.latex?\bg_white \theta > \alpha_2)
will land closest to
![](https://latex.codecogs.com/png.latex?\bg_white T)
and thus would be safer choices for a roof landing.