# Math Help - equation

1. ## equation

John cycled to school and back.
The distance to school and back is 20 km.
On the way to school, John cycled at x km per hour.
On his way back, John’s speed decreased by 2 km per hour.
It took 4 hours altogether to cycle to school and back.

Write an equation for x.

2. I get

$(x + x -2)/2)=20/4$

Doesn't seem right though

3. Hello,

John cycled to school and back.
The distance to school and back is 20 km.
On the way to school, John cycled at x km per hour.
On his way back, John’s speed decreased by 2 km per hour.
It took 4 hours altogether to cycle to school and back.

Write an equation for x.

10km with speed x km/h.
10km with speed x-2 km/h.
The total time was 4 hours.

Let $t_1$ be the time he took for going to school, and $t_2$ be the time to go back.
We know that $t_1+t_2=4$ (hours).

$speed=\frac{distance}{time}$

Therefore, $x=\frac{10}{t_1} \implies t_1=\frac{10}{x}$

and $x-2=\frac{10}{t_2} \implies t_2=\frac{10}{x-2}$

----> $t_1+t_2=4 \implies \frac{\dots}{\dots}+\frac{\dots}{\dots}=4$

Can you take it from here ?