You can put this solution on YOUR website! Your goal is to turn each item into a binomial square plus a number. This is an exercise in completing-the-square. In the reference form you show, the fully multiplied form of it is , and if you'll examine very carefully, see the added term is , which is based on 2p.
Identify the coefficient on the x term. Multiply by and then square this. THIS is the term which you will ADD and SUBTRACT upon the expression.
Notice again, the square term is 2px, and the coefficient is 2p, so the term to add and subtract is
(a)
The term to use is , which you will both ADD and SUBTRACT. The added part will be used to form you square trinomial which you will factor.
(b)
The term to use is