Finding the length of side in a 3d diagram with a few data only

Hello guys,

Here is the question:

"The following three-dimensional diagram shows the four point A, B, C and D

A, B and C are in the same horizontal plane and AD is vertical.

Angle ABC is 45°

BC = 50m

Angle ABD = 30°

and the last on is that Angle ACD is 20°

Using the cosine rule in the trianlge ABC, or otherwise, find AD!"

So the point D is directly above A.

So you can imagine this as a pyramid with different long sides.

So one triangle with D above A as it says.

And now this is as far as I got:

It says that AD is vertical so that we can say that the angles CAD and BAD must be 90 °

Now we have the two triangles on the sides with only 2/3(we donīt need the third angle i think).

To make all algebra easier I named BA as c

and named CA as b

and AD is X what we are looking for

because we have now to rectangular triangles we can use tan twice.

tan 30 = x/c

and tan 20 = x/b

or in the end: c tan 30 = b tan 20

i looked back to the question and saw "use the cosine rule".

The only combination which would make sense is this:

bē=aē+cē-2ac cos (beta)

or

bē=50ē+cē-100c cos 45°

We also could change: c tan 30 = b tan 20 to

b=(c tan 30)/tan20 and square it

bē= (cē x (tan 30)ē)/(tan 20)ē

now we could "eliminate bē) couldnīt we to find c so therefore we have:

(cē x (tan 30)ē)/(tan 20)ē = 50ē+cē-100c cos 45°

Iīve tried several ways but I cant get to c in this equation because I always end up with a cē and a c but cant devide the c.

I hope that is right what Iīve done and that someone can help me please.

Thank you