The angles and distances between a satellite and a ground station are easy enough to calculate with trig, but I made this calculator to save me the trouble of re-deriving the equations every time.
Diagram from here
I think the most intuitive way of solving this problem is to start with the law of sines:
\[\frac{sin(\alpha)}{R_e}=\frac{sin(\beta)}{d}=\frac{sin(90+\epsilon)}{R_E+a}\]If you are trying to calculate the satellite nadir angle α from elevation angle ε and altitude a, you can observe that:
\[\alpha = arcsin\Big(R_E\cdot \frac{sin(90+\epsilon)}{R_E+a}\Big)\]Once you have that, you can calculate β easily from:
\[\beta = 90 - \epsilon - \alpha\]And you can plug β back into the law of sines relationship to determine d:
\[d = R_e \cdot \frac{sin(\beta)}{sin(\alpha)}\]