Snell's law is $n_1\sin\theta_i = n_2\sin\theta_t$ and applying this the refractive indices can be eliminated.
$$r_p = \frac{\sin\theta_i\cos\theta_i - \cos\theta_t\sin\theta_t}{\sin\theta_i\cos\theta_i + \cos\theta_t\sin\theta_t}$$
From here if divide by $\cos^2\theta_i\cos^2\theta_t$ then the result is in terms of tan and sec functions:
$$r_p = \frac{\tan\theta_i\sec^2\theta_t - \tan\theta_t\sec^2\theta_i}{\tan\theta_t\sec^2\theta_i + \tan\theta_t\sec^2\theta_i}$$
which can be rearranged using $\tan^2x + 1 = \sec^2 x$ to give
$$r_p = \frac{\tan\theta_t -\tan\theta_t}{1+\tan\theta_i\tan\theta_t}\frac{1-\tan\theta_i\tan\theta_t}{\tan\theta_i + \tan\theta_t}.$$
This is simply $r_p = \frac{\tan(\theta_t - \theta_t)}{\tan(\theta_i+\theta_t)}$, as required.