Effort Maximization

For a given income, I, and a given level of effort e≥0, Sue's utility is u(I,e) = I - (1/2)eČ

Suppose Sue earns a wage w≥0 no matter how much effort she exerts.

(a) solve for the level of effort she will exert as a function of the wage.

(b) given your answer to part (a) solve for the wage w≥0 that maximizes the firms profit, which is equal to R(e) - w in this case. [i.e. suppose the firm knows how much effort Sue will exert given its choice of wage. Then solve for the wage the firm would choose that maximizes profit]

I am unsure how to go about this problem. How do i solve for the level of effort? is it as simple as taking the derivative with respect to e of u(I,e)?