For a) Just find the Lagrangian. Your budget will be: p_1X_1+p_2X_2 = m and you stated the utiltity function. Solve the Lagrangian and get functions for X_1 and X_2 with respect to p_1,p_2 and m. If you never had the Lagrangian in school, substitute the budget into the utility function. Solve the budget constraint I posted for X_1 or X_2 and fill it into the utility function. Then maximize for the endogenous variable that is left in your utility. b) will be quite simple then. Just fill in what you have and get your results.