With questions about projectiles, such as a ball travelling in the shape of a parabola through the air as in the above question, it is always good to split the problem into the horizontal and vertical components of motion:
In the horizontal direction, there are 3 possible variables to work out. Speed, distance and time. We know:
Horizontal distance to the goal = 25m
and
Horizontal component of speed = 30cos(20)
Therefore using speed = distance/time and rearranging for time, we can work out the time that the ball reaches the goal.
time = distance/speed = 25/30cos(20) = 0.887...seconds
Now, in the vertical direction, there are 5 possible variables to work out. Initial speed (u), distance (s) and time (t) as above, but also acceleration (a) and final speed (v). In the horizontal, the speed remains constant as there is no force acting on it to change it. In the vertical however, the force of gravity acts downwards on the ball, causing the ball to slow down on its way up, eventually reaching a point where the ball stops ascending, and then it starts descending back down towards the ground.
We know:
Vertical height of the goal (s) = 2.44m
Initial velocity of ball (u) = 30sin(20)
Acceleration (a) = -9.8 (this is "g", the acceleration of free fall, and the negative sign is there because it is acting in the OPPOSITE direction to the direction of motion: the ball is moving upwards, gravity is acting downwards).
We now also know, from what we worked out earlier, that the ball takes 0.887s to reach the goal. We can use this time to work out the height of the ball when it reaches the goal, and determine whether that height is greater than, less than or equal to the height of the crossbar (2.44m).
So we have t, a and u and we want to work out s, so use s = ut + 0.5at2
s = 30sin(20)*(0.887) + 0.5(-9.8)(0.887)2
s = 5.25m.
This shows us that the ball ends up going much higher than the crossbar (5.25 >> 2.44), and so unfortunately no goal was scored.
N.B. In this problem, we have assumed that the crossbar is of negligible thickness, that the ground is horizontal, that there is no air resistance and therefore the ball travels in a perfect parabola.