See the attached image for the drawings of the 45-45-90 triangle and the 30-60-90 triangle.
----------------------------------------------
For the 45-45-90 triangle, the two legs are both 3 while the hypotenuse is unknown. Call it x for now.
Using trig we can say
sin(angle) = opposite/hypotenuse
sin(A) = BC/AC
sin(45) = 3/x
sqrt(2)/2 = 3/x
sqrt(2)*x = 2*3
sqrt(2)*x = 6
x = 6/sqrt(2)
x = (6/sqrt(2))*(sqrt(2)/sqrt(2))
x = (6*sqrt(2)/(sqrt(2)*sqrt(2))
x = (6*sqrt(2)/(2)
x = 3*sqrt(2)
where "sqrt" is shorthand for "square root"
----------------------------------------------
For the 30-60-90 triangle, we can say
cos(angle) = adjacent/hypotenuse
cos(D) = DE/FD
cos(60) = 4/y
1/2 = 4/y
1*y = 4*2
y = 8
and we can also say
sin(angle) = opposite/hypotenuse
sin(D) = EF/FD
sin(60) = z/y
sin(60) = z/8
8*sin(60) = z
z = 8*sin(60)
z = 8*sqrt(3)/2
z = (8/2)*sqrt(3)
z = 4*sqrt(3)