basic facts of trigonometry
sine, cosine, and tangent will give you the proportion of the sides of a right triangle in relation to an angle
sin x = opposite side/ hypotenuse
cosx= adjacent side/ hypotenuse
tan x= opposite side/ adjacent side
x is our angle
hypothenuse is the longest side of the right triangle
a good way to memorize this is SOH CAH TOA
now since your picture is not given, I will make some assumptions, such as the hypothenuse is the distance from the sun to the moon.
since you want to find the distance from the earth to the sun, and you know the distance from the earth to the moon, this means on a right triangle, you're trying to find the relationship between the adjacent, opposite side, and an angle
which means you will want to use tan x= opposite side/adjacent
now, i cant go any further because the location of the angle is important in the explanation, but short answer,
sin,cos,tan of an angle will give a proportion of the sides. if you know the measurement of a side, you can use this proportion in order to determine the corresponding measurement of the other side