Utility = $\ln (x_i) + 0.5 (g_1 + g_2)$ subject to $x_i + g_i = 15$.
I have substitued the budget constraint into the utility function:
Utility = $\ln (15 - g_i) + 0.5 (g_1 + g_2)$
I have tried differentiating the budget constraint but am unable to get anywhere.