Consider two agents (Pascal and Friedman) in a pure exchange economy with two goods and no free disposal. Pascal has a preference relation give by the utility function
$$u^P(x_1^P,x_2^P)=a\ln (x_1^P)+(1-a)\ln(x_2^P-bx_2^F)\\\text{subject to the constraint}\;x_1^P+px_2^P\leq w_1+pw_2$$
while Friedman's preferences are
$$u^F(x_1^F,x_2^F)=a\ln (x_1^F)+(1-a)\ln(x_2^F-bx_2^P)\\\text{subject to the constraint}\;x_1^F+px_2^F\leq y_1+py_2$$
Attempt: I need to solve those optimization problems separately by the method of Lagrange. But, since each utility function has the consumption of good two of the other agent I do not know how to solve optimization problems like that. Any hints please.