2D Heat Equation with 2 non-zero BC by separation of variables

I'm trying to solve the following 2D heat equation by separation of variables, but since there are 2 non-zero BCs, is there a way to proceed to turn it into the standard homogenous heat equation or solve it through some other way?

The question involves a rectangle with dimensions $30$ cm x $10$ cm, with the following Laplacian heat equation and boundary conditions: $$\nabla^{2}u=0\\ u(0,y)=0\qquad u(30,y)=50\\ u(x,0)=0 \qquad u(x,10)=50$$ The temperature is held at $0$ degrees at the bottom and left sides of the rectangle, while it's heated at $50$ degrees at the top and right sides. It can be assumed that no time or external factor is involved in this question.

Thanks for any help!

Edit: I found the answer through superposition principle and posted it below.

This principle states that the solution $u(x,y)$ can be written as the following: $$u(x,y) = u_1(x,y) + u_2(x,y)$$ where $u_1(x,y)$ is the solution to the following heat equation problem: $$\nabla^{2}u_1=0\\ u_1(0,y)=0\qquad u_1(30,y)=0\\ u_1(x,0)=0 \qquad u_1(x,10)=50$$ while $u_2(x,y)$ is the solution to the following heat equation problem: $$\nabla^{2}u_2=0\\ u_2(0,y)=0\qquad u_2(30,y)=50\\ u_2(x,0)=0 \qquad u_2(x,10)=0$$
$u_1(x,y)$ and $u_2(x,y)$ have the solutions of a standard heat equation problem.