Trigonometry

sin(A) = opposite / hypotenuse
cos(A) = adjacent / hypotenuse
tan(A) = opposite / adjacent

or

opposite = hypotenuse * sin(A)
adjacent = hypotenuse * cos(a)

or

x = distance * cos(A)
y = distance * sin(A)