With similar triangles
With quadratic equations