Reading farther on the Linked Wikipedia page, we have two cases:
Case 1: the triangle has an angle $\ge120^{\circ}$: the Fermat point is the obtuse-angled vertex.
Case 2: the triangle does not have an angle $\ge120^{\circ}$: the Fermat point is the first isogonic center. Following the link to this page, we find that point has trilinear coordinates $\csc(A+120^{\circ}):\csc(B+120^{\circ}):\csc(C+120^{\circ})$. If, like me, you are not familiar with trilinear coordinates, follow the link to its wikipedia page, where we find a method to convert trilinear coordinates to cartesian:
Taking vertex $C$ as the origin, find vectors $\vec{A}$ and $\vec{B}$ corresponding to the vertexes $A$ and $B$ respectively. Given side lengths $a, b, c$ corresponding in the usual way to the sides of the triangle respectively opposite vertices $A, B, C$, a trilinear coordinate $x:y:z$ is converted to a vector in cartesian coordinates by $$\vec{P}=\frac{ax}{ax+by+cz}\vec{A}+\frac{by}{ax+by+cz}\vec{B}.$$
In short, you have a piecewise function that checks for angle size and, if greater than 120 degrees, returns the $\vec{P}$, plus a correction $\vec{C}$ representing the location of $C$ if it is not convenient to have $C$ at the origin. You could embed the computation for $\vec{A}$ and $\vec{B}$ into the formula to have a single function result. That computation is necessary only if you don't already have coordinates for the vertices, and is elementary trig.
The line $AC$ is defined by $$\frac{y-y_A}{x-x_A}=\frac{y_C-y_A}{x_C-x_A}$$
Then we know $AC(x)=m_{AC}x+b_{AC}$, where $m_{AC}$ is the slope and $b_{AC}$ is the y-intercept (both are known).
Let $BD(x)=m_{BD}x+b_{BD}$. Then $m_{BD}=\frac{-1}{m_{AC}}$ and $b_{BD}=y_B-m_{BD}x_B$.
Now solve $AC(x)=BD(x)$.
Best Answer
The slope of the altitude is opposite reciprocal of the slope of $AB$
You can find the equation of $CD$ using point slope formula and find the intersection of $AB$ and $CD$