I have the following equation:

I would like to solve this for Ze. I have found the same equation expressed in terms of Ze in another paper:

I can't get my head around how this works. This is my attempt:

However, there is something about the last step that doesn't seem right to me, even though the answers match.
Can anyone explain the correct process for simplifying the first equation in terms of Ze?