Assume we have a number line, where the tail of the worm is at x=0. This means that the head of the worm is at x=15.
Also, we know that the coordinate of the head of the worm follows this equation:
![x_H(t) = 15+2t](https://img.qammunity.org/2019/formulas/mathematics/middle-school/z2zie65pxgpfyp1f5ckr4yfpzkd8htxd9s.png)
Where
is the time in seconds. In fact, we know that the worm gains 2 centimeters per second.
Now, assume that the ant also starts at x=0, and walks with a certain rate of
centimeters per second. This means that the equation for the position of the ant is
![x_A(t) = v_At](https://img.qammunity.org/2019/formulas/mathematics/middle-school/ndb6pnajgfemv5jq4fmi58apn3g4e1y6se.png)
Now, we know that after 5 seconds the ant is in the same position as the head of the worm, which means
![x_A(5) = x_H(5)](https://img.qammunity.org/2019/formulas/mathematics/middle-school/iqrqlmycssqw3wi822nqg3n6nrndpz4xu9.png)
We know the equation for both expressions, so let's subtitute them in:
![5v_A = 15+2\cdot 5 \iff 5v_A = 15+10 \iff 5v_A = 25 \iff v_A = 5](https://img.qammunity.org/2019/formulas/mathematics/middle-school/japfoiwwoxjpkt425x0zoil7c1r2dzzo4h.png)
So, the ant walks at a rate of 5cm per second.