Central bank loss function (I did a solution, but it doesn’t totally make sense I guess)
You need to differentiate with respect to Y, as you said! You substitute the phillips curve as you did (because it is a constraint for the central bank's optimization problem), then differentiate w.r.t $\bar{Y}$ (which I assume here stands for gap) and set this to 0 to obtain the optimality condition, which in turn will give you the monetary rule. Recall that once the optimal output-inflation combination is determined using the monetary rule, the central bank sets the interest rate to implement its choice.