I'm trying to derive the utility possibility frontier of a economy whose consumption contract curve is $$y_A = \frac {y} {x} x_A$$ and $$y_B = \frac {y} {x} x_B$$where $x_A + x_B = x$ and $y_A + y_B= y$.
$$U_i = \sqrt {x_iy_i}$$
While deriving the UPF. they have added up $U_A$ and $U_B$, and I don't understand why. Why do we add up utilities while deriving UPF?
(I gave all the details of the question because I'm not sure if they added the utilities only because of the peculiarities of the question or if its an algorithm. )