First of all, you must observe that no matter what else happens 5 - x >= 0. or x <= 5. If you get anything else, then you throw it out.
What did you get after 5 - x = (x+1)^2?
Note that if you square both sides of an equation (or, more generally, multiply both sides by the same thing), you may introduce values that satisfy the new equation but not the original equation. For example, x= 3 has only the obvious solution "3" but has both 3 and -3 as solutions.
The "answer" is to check any solutions you get in the original equation. has two roots but only one of them satisfies .