The above method is geometric in approach, using the fact that proportion rise/run is 5/6 pitch on one slope and 6/12 on other slope. You can also set this in an algebraic context as finding where two lines intersect.
One line starts at (0, 0) and has positive slope 5/6 , because it is sloping up.
Its equation is y = (5/6) * x.
Other line starts at (20, 0) and has negative slope –6/12, because it is sloping down.
Its equation is y = (–6/12) * (x – 20).
You seek where the lines cross, which is when the two formulas are equal.
(5/6)x = (–1/2)(x – 20)
Use distributive property.
(5/6)x = (–1/2)x + (–1/2 * –20)
(5/6)x = (–1/2)x + 10
(5/6)x + (1/2)x = 10
Same result.