If you’re at $30^\circ$s, $21^\circ$e, and you travel due west until your longitude is $18^\circ$e, how far have you gone? Assume the Earth is a sphere of radius $6370\,\mathrm{km}$.
Since you’re traveling due west, you’ll stay on the $30^\circ$s circle. The radius of this circle is not the same as the radius of the Earth – circles of equal latitude get smaller the closer they are to the poles. To work out the radius, which I’ll call $r$, imagine a vertical cross-section of the Earth: Now focus on the right-angled triangle shown above. Its hypotenuse is the radius of the Earth, $R = 6370\,\mathrm{km}$. We can work out that its angles are $30^\circ$ and $60^\circ$ (for example by alternate angles, with the equator line parallel to the $30^\circ$s line). So $r = R\sin 30^\circ = R/2 = 3185\,\mathrm{km}$.
Since you start at $21^\circ$e and finish at $18^\circ$e, you’ve travelled $3^\circ$ along the circle with radius $r$, so the distance is $3\pi r/180 = \pi r / 60$, which is roughly $167\,\mathrm{km}$.