Answer:
a) The distance travelled by the the locomotive is 30 meters, b) The final displacement of the locomotive is 6 meters westwards.
Step-by-step explanation:
a) The distance travelled is the sum of magnitudes of distances covered by the train during its motion. That is to say:
![s_(T) = 18\,m + 12\,m](https://img.qammunity.org/2021/formulas/physics/high-school/wjscozaw4888p2gvyh0uo812kg6knudvea.png)
![s_(T) = 30\,m](https://img.qammunity.org/2021/formulas/physics/college/5mpn357x1vctywjpuaa4v1ynnccm6yxz84.png)
The distance travelled by the the locomotive is 30 meters.
b) The displacement is the vectorial distance of the train with respect to a point of reference, since west and east are antiparallel to each other, calculations can be simplified to a scalar form. Let suppose that movement to the east is positive. The calculations are presented below:
![s_(P) = -18\,m +12\,m](https://img.qammunity.org/2021/formulas/physics/high-school/wryjummypiopbfaigdr6deftb4yldz8cf2.png)
The final displacement of the locomotive is 6 meters westwards.