Let the vertices of a triangle be, O(0,0)A(a,0) and B(b,c) equation of altitude BD is x=b.
Slope of OB is bc.
Slope of AF is −cb.
Now, the equation of altitude AF is y−0=−cb(x−a)
Suppose, BD and OE intersect at P.
Coordinates of P are [b,b(c(a−b))]
Let m1 be the slope of OP=ca−b
and m2 be the slope of AB=b−ac
Now, m1m2=(ca−b)(b−ac)=−1
We get, that the line through O and P is perpendicular to AB.