Algebra in trigonometry, algebraic proof? 
The picture says it all. "Vis at" means "show that". My first thought was that h is 2x, which is not correct. Maybe the formulas for area size is useful? 
EDIT: (To make the question less dependent from the picture.)
A square with side $x$ is placed in the right triangle with legs $g$ and $h$. Show that $x=\frac{gh}{g+h}$.
 A: You can split the triangle into one triangle with base $g$ and height $x$, and another with base $h$ and height $x$.  Just draw the diagonal line from the right angle to the opposite vertex of the $x\times x$ square.  One of those triangles has area $gx/2$; the other has area $hx/2$.  But they must add up to $gh/2$.  Hence
$$
\frac{gx}{2} + \frac{hx}{2} = \frac{gh}{2}.
$$
By trivial algebra, the desired result will follow.
A: From the geometry of the problem (see figure and identify two similar triangles (Wikipedia) or here), we can get the following proportions:
$$\dfrac{h-x}{x}=\dfrac{x}{g-x}=\dfrac{h}{g}\tag{1}.$$ 

$$|AR|=h-x,|PR=x|,|PQ|=x,|BQ|=g-x,\measuredangle APR=\measuredangle PBQ,\measuredangle PAR=\measuredangle BPQ.$$
Relation $(1)$ comprises 3 equations. Solve one of the them:  
$$\dfrac{h-x}{x}=\dfrac{x}{g-x},\tag{2}$$
$$\dfrac{h-x}{x}=\dfrac{h}{g},\tag{3}$$
or   
$$\dfrac{x}{g-x}=\dfrac{h}{g}\tag{4}.$$ 


*

*Note 1: If it is required a proof using trigonometry (in the title), I can reformulate my answer. Added. If you apply trigonometry (mentioned in the title), note that $\tan \widehat{%
ABC}=\frac{h}{g}$, $\tan \widehat{APR}=\frac{h-x}{x}$ and $\tan \widehat{APR}%
=\tan \widehat{ABC}$. Use this equality and solve for $x$.

*Note 2: If you haven't yet learned about similar triangles, I will modify my answer.
A: Consider the area of the whole triangle and the areas of the constituent triangles and square.
