The identity we want to verify is:

.
Note that sec(x)=1/cosx, so we write the right hand side as 2/(cos(x)).
We multiply the first expression by (cosx)/(cosx), and the remaining two by (1+sinx)/(1+sinx) to have them in common numerators:

.
Now we can only consider the numerators. The right hand side, expanding (1+sinx)^2 becomes:

.
From the identity

, the expression further simplifies to:

. This proves the identity.