You're looking to put this into vertex form, which is:
[tex]\sf y=a(x-h)^2+k[/tex]
Where [tex]\sf (h,k)[/tex] is the vertex of the parabola(minimum).
You currently have it in standard form, which is:
[tex]\sf y=ax^2+bx+c[/tex]
To go from standard form to vertex form, we need to complete the square. But first, let's factor out the coefficient of the first term out of the first two terms:
[tex]\sf p^2-28p+250[/tex]
[tex]\sf 1(p^2-28p)+250[/tex]
Now let's complete the square inside of the parenthesis. We take half of the second term(-28p), square it, and then add it and subtract it into the parenthesis(because we have to keep the function the same). Half of -28 is -14, -14 squared is 196:
[tex]\sf 1(p^2-28p+196-196)+250[/tex]
Now the first three terms in the parenthesis are a perfect square, we can factor them:
[tex]\sf 1((p-14)^2-196)+250[/tex]
Distribute 1 into the parenthesis(anything times 1 is itself):
[tex]\sf (p-14)^2-196+250[/tex]
Combine like terms:
[tex]\boxed{\sf (p-14)^2+54}[/tex]