There may be a "formula" for this problem...but I, unfortunately, do not know one.
This problem is messy no matter how you do it and I will not do it for you, but I will tell you how to do it. The orthocenter is the intersection of the altitudes of the triangle which are concurrent.
First, you need the slope of 2 sides of the triangle.
Then you need to write the equation of the line perpendicular to each of the 2 sides and through the opposite vertex. Remember the perpendicular will have slope equal to the negative reciprocal of the side.
Solve each equation for y and set the two values for y equal to each other and solve for
x. This is the abscissa of the orthocenter and the y from either of the 2 equations is the ordinate.