You need to use the superposition principle. You can solve two seperate problems and add the solutions together. Set one of the non-homogeneous boundary conditions equal to zero and solve that problem. Then set the other boundary condition equal to zero and solve it.
The answer is the sum of the two different solutions.
Yes it will work with any boundary conditions as long all of the other conditions are preserved in each problem.
This link may be helpful. Look at the very last section on the web page. The last two paragraphs will be useful.
Laplace Equation - Wikiversity
Yes so explicitly you need to solve these two BVP's
Problem 1
Problem 2
Since you are forcing the other boundary conditions to be zero, they will not mess up the other boundary conditions when you sum of the solutions.