First compute the Fourier coefficients of the given boundary conditions:
Then the solution is equal to:
But this only satisfies the BC on the top of the plate if