The quick hint is this… label the bottom length x so that the entire bottom section of the RIGHT triangle is d+x.
Then you can say
tan(ALPHA) = h / (x+d)
tan (BETA) = h/x
then solve the second for x and substitute into the first.
For details, you can see the solution in this book