
If we assume x and y are positive, then we can draw
a couple of right triangles, one containing acute angle
A and one containing acute angle B.


and 

A is the angle whose sine is x, or x/1, so since the sine is the
opposite over the hypotenuse we put x on the opposite side of A
and 1 on the hypotenuse, then use the Pythagorean theorem to calculate
the adjacent side.
B is the angle whose tangent is y, or y/1, so since the tangent is the
opposite over the adjacent we put y on the opposite side of B
and 1 on the adjacent side, then use the Pythagorean theorem to calculate
the hypotenuse.
So






Warning: This solution assumes that x and y are both positive,
which puts the angles A and B both in quadrant I.
If x and/or y were negative then A and/or B could be in other
quadrants, which would cause one or both of the terms in the
numerator to have negative signs.
Edwin