The total distance John travelled can be obtained by finding the sum of the distances between two consequtive points.
The expression for the distance between two points is,
![D=\sqrt[]{(x_2-x_1)^2+(y^2-y_1)^2}](https://img.qammunity.org/2023/formulas/mathematics/college/a53we57cylmyx3nigo5p0cb1l31sw4zoqe.png)
Here, (x1, y1) and (x2,y2) are the coordinates of two points.
Given, A(0,4), B(4,1), C(3,-1) and D(-1,2) are the coordinates of cities.
The distance beween A(0,4) and B(4,1) is,
![\begin{gathered} AB=\sqrt[]{(4-0)^2+(1-4)^2} \\ =\sqrt[]{16+(-3)^2} \\ =\sqrt[]{16+9} \\ =\sqrt[]{25} \\ =5 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/rh5mx52qo8h94f6trqnue74laohml8ns7x.png)
The distance beween B(4,1) and C(3,-1) is,
![\begin{gathered} BC=\sqrt[]{(3-4)^2+(-1-1)^2} \\ =\sqrt[]{(-1)^2+(-2)^2} \\ =\sqrt[]{1+4} \\ =\sqrt[]{5} \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/czaumg5b3b0s7luzpz7gk1mc3ckx2v0kcr.png)
The distance beween C(3,-1) and D(-1,2) is,
![\begin{gathered} CD=\sqrt[]{(-1-3)^2+(2-(-1)})^2 \\ =\sqrt[]{(-4)^2+3^2} \\ =\sqrt[]{16+9} \\ =\sqrt[]{25} \\ =5 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/6faq7k3qhjxe4oc3pnmursl74c7a32aeaz.png)
The distance beween A(0,4) and D(-1,2) is,
![\begin{gathered} AD=\sqrt[]{(-1-0)^2+(2-4)^2} \\ =\sqrt[]{1+(-2)^2} \\ =\sqrt[]{1+4} \\ =\sqrt[]{5} \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/88m7d0c7zmegj2ynl9zve8qkiorddy8pex.png)
Now, the total distance John traveled is,
![\begin{gathered} D=AB+BC+CD+AD \\ =5+\sqrt[]{5}+5+\sqrt[]{5} \\ =10+2\sqrt[]{5} \\ =14.5 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/q9axvy7oo06plgkr7fbuccpri2necxhjjq.png)
Therefore, the total distance John traveled rounded to the nearest tenth is 14.5 units.