Equation:
This is because after Josh has walked the extra 2 km, he will be half way which can be directly translated to the equation.
Total Length:
First, simplify the right side to get 19=h/2. Then multiply by 2 to get 38=h, which is your answer.