The boundary conditions are on the picture
Let me write them again
v(x=0,y)=0
v(x,y=0)=0
v(x,y=a)=0
while x goes to inf, V(x,y)=Y(y)
Edit: You said " You cannot combine the two solutions and expect the same result as if you had done it properly the first time." but, yes we can...