Is that
or
Technically, you wrote the first.
What ideas have you had so far?
I doubt that you're asked to treat k as a variable. When I see this sort of maximization problem, I think of maximizing g as a function of s (note that you have g(s), not g(s,k)). Since you have a parabola, there are two methods of solving this problem. You could do the calculus method of taking the derivative and setting it equal to zero. Or, if you feel uncomfortable with that, then just complete the square. Pick a method, and see what happens.
All right, let's complete the square, then.
The idea with completing the square is this. However, in your case, you're going to end up with something that looks like this:
Your goal is to find so that this holds. Make sense?