Question 902578
The method is the same for both. 
I'll do the first.
You repeat the method on the second.
y=x^2+dx+49 
Take the x-coefficient, halve it, square it and add and subtract it to the right hand side.
{{{(d/2)^2=d^2/4}}}
{{{y=x^2+dx+d^2/4+49-d^2/4}}}
{{{y=(x+d/2)^2+(196/4)-d^2/4}}}
{{{y=(x+d/2)^2+((196-d^2))/4}}}