Check the picture below.
let's make α = 27°50' and β = 20°10'.
[tex]\begin{array}{rllll} tan(\alpha)=\cfrac{h}{x}\implies xtan(\alpha)=h \\\\\\ tan(\beta)=\cfrac{h}{x+126}\implies (x+126)tan(\beta)=h \end{array}[/tex]
since h = h, we can simply
[tex]xtan(\alpha)=(x+126)tan(\beta)\implies xtan(\alpha)=xtan(\beta)+126tan(\beta) \\\\\\ xtan(\alpha)-xtan(\beta)=126tan(\beta)\implies x[tan(\alpha)-tan(\beta)]=126tan(\beta) \\\\\\ x=\cfrac{126tan(\beta)}{tan(\alpha)-tan(\beta)} \\\\[-0.35em] ~\dotfill\\\\ \stackrel{\textit{since we know that}}{xtan(\alpha)=h}\implies \cfrac{126tan(\beta)}{tan(\alpha)-tan(\beta)}tan(\alpha)=h \implies \cfrac{126tan(\beta)tan(\alpha)}{tan(\alpha)-tan(\beta)}=h[/tex]
now, if we do the degrees and minutes conversion to just degrees for the sake of sticking it in the calculator, mind you make sure your calculator is in Degree mode, for 27°50' we get about 27.83° and for 20°10' we get 20.16°
[tex]\cfrac{126tan(\beta)tan(\alpha)}{tan(\alpha)-tan(\beta)}=h\implies \cfrac{24.4329}{0.1607}\approx h\implies 152.03\approx h[/tex]