You can't perform separation of variables just yet. It's not really possible to match both of the inhomogeneous boundaries to the same product, as you have probably tried. What we usually do, is to solve two separate problems, such that
$$ \begin{matrix} \begin{cases} \nabla^2u_1=0 \\ u_1(x,0) = 3\sin x + 7\sin (17x) \\ u_1(x,\pi) = 0 \\ u_1(0,y) = 0 \\ u_1(\pi,y) = 0 \end{cases}
&& \begin{cases} \nabla^2u_2=0 \\ u_2(x,0) = 0 \\ u_2(x,\pi) = 0 \\ u_2(0,y) = \sin(3y) + 17\sin(7y) \\ u_2(\pi,y) = 0 \end{cases} \end{matrix} $$
You can check that $u = u_1 + u_2$ solves the original problem.
For some more intuition, let's solve the first problem in $u_1$. Separating the variables:
\begin{align} X'' + \lambda X = 0, & \quad X(0) = X(\pi) = 0 \\ Y'' - \lambda Y = 0, & \quad Y(\pi) = 0 \end{align}
which gives
\begin{align} X(x) &= \sin(nx) \\ Y(y) &= \sinh\big(n(\pi-y)\big) \end{align}
where $\lambda_n=n^2$. Notice, the two homogeneous B.C.s on $X(x)$ allows us to "lock" the solution to a specific $\sin$ function. This wouldn't have been possible in the original problem.
So the general solution for the first problem is
$$ u_1(x,y) = \sum_{n=1}^\infty a_n \sin(nx) \sinh\big(n(\pi-y)\big) $$
The final inhomogeneous boundary gives
$$ u_1(x,0) = \sum_{n=1}^\infty a_n \sinh(n\pi) \sin(nx) = 3\sin x + 7\sin(17x) $$
You can make your own conclusion about what happens here.
The second problem is nearly identical to the first, except the $\sin$ series is on $y$ instead of $x$.