You can use the superposition principle to combine solutions obtained by separation of variables. For example, in Prob. 3.16 you found the potential inside a cubical box, if five faces are grounded and the sixth is at a constant potential V0; by a six-fold superposition of the result, you could obtain the potential inside a cube with the faces maintained at specified constant voltages V1,V2,…V6. In this way, using Ex. 3.4 and Prob. 3.15, find the potential inside a rectangular pipe with two facing sides (x=±b) at potential V0, a third (y=a) at V1, and the last (at y=0) grounded.