My question is regarding Bohr's equation, which, from what I understand (please correct me if I'm wrong), is used to calculate the energy gained or lost when an electron changes "states" (n=1, n=2, etc). Not exactly sure what a "state" is...although I know that a change in "state" from higher to lower results in the emission of a photon. Are "states" the same as orbitals?

Anyway, my main question is how this equation went from step 1 to step 3:

/\E= E_{final} - E_{initial}

= (-2.18 x 10^{-18} J)(1/n_{f}^{2}) - (-2.18 x 10^{-18} J)(1/n_{i}^{2})

= -2.18 x 10^{-18} J (1/n_{f}^{2} - 1/n_{f}^{2})

I know this has something to do with factoring -- but I forgot the rules that govern factoring. Like -2x-(-3x)=?

I should know this but it's been several years since my last math class.