Since all we're asked to do here is to supply the missing step, let's look at what is different and what remains the same. Clearly the right side hasn't changed. The left side still has cot θ, which had been in both left-side terms in the previous step. What is different is that sec θ is now there, along with this 1 that doesn't yet have an obvious reason to be there. Also, instead of two terms on the left side, we now only have one. So whatever substitution occurred, it managed to wipe some things out and reduce the number of terms.
Hopefully you can see that, in the previous step,  cot θ sec θ csc2 θ - cot3 θ sec θ has some common factors that can be separated out to the outside of a parenthesis.  We can factor out cot θ and sec θ.  This results in cot θ sec θ (csc2 θ - cot2 θ). Curiously, this looks a lot like the next step, which is cot θ sec θ. All that remains now is to establish that csc2 θ - cot2 θ = 1. This can be done by taking the Pythagorean identity cot2 θ + 1 = csc2 θ, and "solve it for" the expression csc2 θ - cot2 θ. This, of course, can be done by subtracting cot2 θ on both sides. What remains on the other side is 1, and that's precisely what we need in that spot.