Understand the conditions for crossing a river along the shortest path.
To cross a river along the shortest path, the swimmer's resultant velocity (relative to the ground) must be perpendicular to the river's flow direction. This means the component of the swimmer's velocity in the direction of the river flow must exactly cancel out the river's velocity.
Let:
\begin{itemize}
\item $v_s$ = speed of the swimmer in still water = 20 kmph
\item $v_r$ = speed of the river flow = 10 kmph
\item $\theta$ = angle with the direction of flow in which the swimmer has to swim (measured from the river's flow direction).
\end{itemize}
For the shortest path, the swimmer's resultant velocity ($\vec{v_{res}}$) must be perpendicular to the river's flow ($\vec{v_r}$). This implies that the component of the swimmer's velocity relative to water ($\vec{v_s}$) that is parallel to the river flow must exactly counteract $\vec{v_r}$.
Let the river flow be along the positive x-axis. The swimmer's velocity vector $\vec{v_s}$ makes an angle $\theta$ with the positive x-axis.
The x-component of the swimmer's velocity is $v_s \cos \theta$.
For the net velocity along the flow to be zero:
$v_r + v_s \cos \theta = 0$
$v_s \cos \theta = -v_r$
$\cos \theta = -\frac{v_r}{v_s}$
Substitute the given values:
$v_r = 10 \text{ kmph}$
$v_s = 20 \text{ kmph}$
$\cos \theta = -\frac{10}{20} = -\frac{1}{2}$
We need to find $\theta$ such that $\cos \theta = -1/2$.
In the context of vectors, $\theta$ is measured counter-clockwise from the direction of flow. The angle whose cosine is $-1/2$ in the relevant range ($0^\circ$ to $180^\circ$) is $120^\circ$. This means the swimmer must point their body at an angle of $120^\circ$ with respect to the direction of river flow (i.e., $180^\circ - 120^\circ = 60^\circ$ upstream from the line perpendicular to the bank).
Final check:
If the swimmer swims at an angle of $120^\circ$ to the flow, then the component of their velocity in the direction of flow is $20 \cos(120^\circ) = 20 \times (-1/2) = -10$ kmph.
This exactly cancels the river's velocity of 10 kmph, resulting in zero net velocity along the flow direction. The net velocity will be perpendicular to the flow, allowing for the shortest path.
The final answer is $\boxed{\text{120^\circ}}$.