From the Lagrangian we know that:
\(\frac{P_X}{P_Y}=\frac{2Y}{X}\)
Substituting in the budget constraint to find the individual demand function:
\(P_X(2-\bar{X})+P_Y=P_X X+ \frac{P_X}{2} X\)
\(X=\frac{4}{3}-\frac{2}{3}\bar{X}+\frac{2}{3}\frac{P_Y}{P_X}\)
The aggregate demand curve for X is equal to the horizontal sum of the two individual demand curves. Since each group represents 50% of the population, we can say that the total endowment is equal to 2 if there are only two individuals:
\(2= 0.5\bar{X}+0.5\frac{P_Y}{P_X}+\frac{4}{3}-\frac{2}{3}\bar{X}+\frac{2}{3}\frac{P_Y}{P_X}\)
\(\frac{P_Y}{P_X} = \frac{4+\bar{X}}{7}\) Is the relative price.
We now find for the indirect utility function for group 1:
\(U= ln(0.5\bar{X}+0.5\frac{P_Y}{P_X}) + ln(0.5\bar{X}+0.5\frac{P_X}{P_Y})\)
\(U= ln(0.5\bar{X}+0.5\frac{4+\bar{X}}{7}) + ln(0.5\bar{X}+0.5\frac{7}{4+\bar{X}})\)
\(U= ln(\frac{2+4\bar{X}}{7}) + ln(0.5\bar{X}+0.5\frac{7}{4+\bar{X}})\)
Since U = 0.5 :
\(e^{0.5}= (0.5\bar{X}+0.5\frac{4+\bar{X}}{7})(0.5\bar{X}+0.5\frac{7}{4+\bar{X}})\)
\(16\bar{X}^2+4.46\bar{X}-42.16=0\)