Since you are looking for separable solutions assume it has the form.

This gives

This gives

With

(why?)

This gives the system

The boundary conditions gives

The solutions to the X equation are

This gives

with

Now if you solve the Y equation you get

This gives

For C just use this formula

For D just mimic the process done in b)