Refer to the figure below.
The velocity diagram adds the speed of the boat (due east) as a vector to the combined speed of the water and the wind (due north) to obtain the velocity of the flag, at an angle θ, counterclockwise from the eastern direction.
By definition,
tan θ = 8/4 = 2
θ = arctan(2) = 63.4°
Answer:
The flag blows in a direction which is 63.4° measured counterclockwise from the eastern direction.