The free-body diagram of the forces acting on the flag is in the picture in attachment.
We have: the weight, downward, with magnitude
the force of the wind F, acting horizontally, with intensity
and the tension T of the rope. To write the conditions of equilibrium, we must decompose T on both x- and y-axis (x-axis is taken horizontally whil y-axis is taken vertically):
By dividing the second equation by the first one, we get
From which we find
which is the angle of the rope with respect to the horizontal.
By replacing this value into the first equation, we can also find the tension of the rope: