Step 1: Draw a figure from the given information
Given that
Wind speed along the north-east direction v_w = 72 km/h
Boat velocity along the north v_b = 51 km/h

Since the wind blows from north to east, the angle between NE and E, \angle NEOE = 45\degree
Angle between S and E = 90\degree
Step 2: Calculating the direction of the flag
The wind's velocities are along the North-East axis. When the boat begins to move, the flag will flutter in the direction of the relative velocity of the wind with respect to the boat.
Angle between the velocity of the wind and boat ( v_w \text{ and } - v_b ), \theta = (90\degree + 45\degree)
Components of resultant vector(flag direction),
v_w = v_{w} \cos \theta
v_b = v_b + v_{w} \sin \theta
Direction of the flag, \tan \beta = \frac{v_{b} \sin \theta}{v_w + v_{b} \cos \theta}
\tan\theta=\frac{51\sin(90+45)\degree}{72+51(\cos(90+45)\degree)}
\tan\theta=\frac{51\cos45\degree}{72+51(-\sin45\degree)}
\tan\theta=\frac{51*\frac{1}{\sqrt{2}}}{72-51*\frac{1}{\sqrt{2}}}
\tan \theta = \frac{51}{72*\sqrt{2} - 51}
\theta = \tan^{-1} (1.003)
\theta = 1.1 \degree
Hence, direction of the flag \theta = 1.1 \degree almost due east