Do you know how to complete the square? That is, for example, turning x2+4x+1 into (x+2)2−3. This is how to do part a.
As for part b, as the equation has equal roots, it's of the form (x−α)2, so the discriminant must be equal to zero, i.e. b2−4ac=0. Obviously you need to do part a to find the value of b=2k.
If you don't know how to do any of the above let me know.
Remember when completing the square that yes you half the coefficient of x which is in this case 2k. Therefore inside the brackets you'll have (x+k)^2
If you were to then multiply this out you would get x^2 + 2k but also +k^2 which you wouldn't want. You must then subtract this away and add on the remaining c.