Consider the PDE $$-\frac{\partial ^2 w}{\partial x^2}+\frac{\partial^2 w}{\partial y^2}=1.$$
I've found that the general solution of this PDE is given by $$w(x,y)=\frac{1}{4}(y^2-x^2)+g(y-x)+f(y+x)$$ for some functions $f$ and $g$.
I'm now given the conditions \begin{align*} w(x,0)&=0, \\ \frac{\partial w}{\partial y}(x,0)&=0,\\w(0,y)&=0,\end{align*} so that the PDE is defined on the domain $A \cup B=\{y>0,y>x\} \cup \{x>0,x>y\}$.
How do I apply these conditions? The first two on their own give me $w(x,y)=y^2/2$, but this doesn't take into account the nature of the domain and doesn't allow me to use the third condition.
I'm not sure where you got $u$ from as it's not in your equations at all! Let's assume you meant $w$ Applying the boundary conditions to your general solution, one at a time result in: $$-x^2/4+g(-x)+f(x)=0$$ $$g'(-x)+f'(x)=0$$ $$y^2/4+g(y)+f(y)=0$$ you can change the dummy variable on the last equation and sum it with the first one: $$g(-x)+g(x)+2f(x)=0$$ Derivative of this would be: $$-g'(-x)+g'(x)+2f'(x)=0$$ replacing $f'(x)$ from the second boundary condition: $$g'(-x)=g'(x)/3$$ replacing this into the second boundary condition: $$g'(x)/3+f'(x)=0$$ You can now take derivatives of the first and third boundary conditions and use the above two equations to solve for $f(x)$ and $g(x)$