<s>[INST] Find the perimeter of any triangle given the three altitude lengths The altitude lengths are 12, 15 and 20.  I would like a process rather than just a single solution.
 [/INST] Consider the triangle 

 
Triangle with angles $A,B,C$ and opposite sides $a,b,c$

Its area is given e.g. by $$S=\dfrac{bc\sin A}{2}.\tag{1}$$ From the following trigonometric relations valid for a triangle
$$\sin A=2\sin \frac{A}{2}\cos \frac{A}{2}\tag{2}$$
and
$$\sin \frac{A}{2}=\sqrt{\dfrac{(p-b)(p-c)}{bc}}\tag{3}$$
$$\cos \frac{A}{2}=\sqrt{\dfrac{p(p-a)}{bc}},\tag{4}$$ 
we obtain the Heron's formula 
$$S=\sqrt{p\left( p-a\right) \left( p-b\right) \left( p-c\right) },\tag{5}$$
where $$2p=a+b+c\tag{6}$$ is the perimeter.  A geometric proof of $(5)$ can be found in this post, in Portuguese. In this case $S=\dfrac{12a}{2}=\dfrac{15b}{2}=\dfrac{20c}{2}$. Then $a=\dfrac{1}{6}S,b=\dfrac{2}{15}S$ and $c=\dfrac{1}{10}S$. Hence
$$2p=a+b+c=\frac{1}{6}S+\frac{2}{15}S+\frac{1}{10}S=\frac{2}{5}S,\qquad p=\frac{1}{5}\tag{7}S$$
and
$$S=\sqrt{\frac{1}{5}S\left(\frac{1}{5}S-\frac{1}{6}S\right)\left(\frac{1}{5}S-\frac{2}{15}S\right)\left(%
\frac{1}{5}S-\frac{1}{10}S\right)}=\frac{1}{150}S^{2}.\tag{8}$$
Solving for $S$, we get $S=150$. So the perimeter is $$\boxed{2p=\frac{2}{5}150=60.}\tag{9}$$
Note: the  sides
are $a=\dfrac{1}{6}150=25,b=\dfrac{2}{15}150=20,c=\dfrac{1}{10}150=15$.

Added: 


Triangle with angles $A,B,C$, opposite sides $a,b,c$ and altitudes $h_1,h_2,h_3$

For the general case of a triangle with altitudes $h_{1},h_{2},h_{3}$
perpendicular respectively to sides $a,b,c$ its area is $S=\dfrac{ah_{1}}{2}=%
\dfrac{bh_{2}}{2}=\dfrac{ch_{3}}{2}$. Consequently $a=\dfrac{2S}{h_{1}}$, $b=%
\dfrac{2S}{h_{2}}$, $c=\dfrac{2S}{h_{3}}$. So the perimeter $2p$ and
semi-perimeter $p$ of the triangle are given by
$$\begin{eqnarray}
2p &=&a+b+c=\frac{2S}{h}, \\
p &=&\frac{S}{h},
\end{eqnarray}\tag{A}$$
where $h$ is such that
$$\begin{equation}
\frac{1}{h}=\frac{1}{h_{1}}+\frac{1}{h_{2}}+\frac{1}{h_{3}}
\end{equation}\Leftrightarrow h=\frac{h_{1}h_{2}h_{3}}{h_{2}h_{3}+h_{1}h_{3}+h_{1}h_{2}}.\tag{B}$$
Thus
$$\begin{eqnarray*}
S &=&\sqrt{\frac{S}{h}\left( \frac{S}{h}-\frac{2S}{h_{1}}\right) \left( 
\frac{S}{h}-\frac{2S}{h_{2}}\right) \left( \frac{S}{h}-\frac{2S}{h_{3}}%
\right) } \\
&=&\frac{S^{2}}{h^{2}}\sqrt{\frac{\left( h_{1}-2h\right) \left(
h_{2}-2h\right) \left( h_{3}-2h\right) }{h_{1}h_{2}h_{3}}}
\end{eqnarray*}\tag{C}$$
Solving for $S$, we now get
$$\begin{equation}
S=\dfrac{h^{2}}{\sqrt{\dfrac{\left( h_{1}-2h\right) \left( h_{2}-2h\right)
\left( h_{3}-2h\right) }{h_{1}h_{2}h_{3}}}}
\end{equation}\tag{D}$$
and finally the perimeter as a function of $h,h_1,h_2$ and $h_3$, with $h$ being a function of $h_1,h_2,h_3$ given by $(\text{B})$:
$$\boxed{\begin{equation}
2p=\dfrac{2h}{\sqrt{\dfrac{\left( h_{1}-2h\right) \left( h_{2}-2h\right)
\left( h_{3}-2h\right) }{h_{1}h_{2}h_{3}}}}.
\end{equation}}\tag{E}$$
</s>