PG,
You are correct that you need to be careful when you change the form of equations. There is always risk that the slight differences in form can have significant consequences to what we are trying to do. In this case, the form is slightly different, but you should view equation 3 as a method for determining the A and B constants. Then those constants are substituted in eq. 2 to make eqn. 4, and eqn. 4 is a true equivalence. So, how do you know the method will always work? In math, you have to prove things to know them. Intuitively, it's not hard to see that the method does produce the correct constants that create a real equivalence, but proving something for all cases is not always easy even when the result is obvious, without the proof.
So, you can be confident that the method of partial fractions has been proved valid by mathematicians; however, if you want to prove it to yourself and not take the word of mathematicians, you'll have to do some clever thinking, or track down an existing proof and study it until you are sure that it is correct. Personally, when i do partial fractions, I do it intuitively and then look at the final answer to verify that the new form is an exact representation of the old form. Hence, I prove it on a case by case basis as part of my process of double checking my answers. This is much easier than a generalized proof for all the common and uncommon cases of partial fraction expansion.
Steve