Does a General Equilibrium here require Pareto Optimality? There are two consumers $A$ and $B$, and two producers $X$ and $Y$. he consumers are endowed with labour(L) and capital(K) $L_A,K_A$, and $L_B,K_B$ respectively. The preferences of the two consumers have the utility functions $U_A=X_A^4Y_A$ and $U_B=X_BY_B$. The technologies of the two producers are given by $X=\sqrt{K_XL_X}/2$ and $Y=2\sqrt{K_YL_Y}$. Setting the wage rate $w=1$, what are the competitive general equilibrium relative prices?

This is inspired from a homework problem, but I wish to understand how to solve this general class of questions. Does this require pareto optimality? How does calculus feature in this question? Any help would be great! Thanks.
Competitive equilibrium is the price vector $(p_x, p_y, w =1, r)$ such that it solves the following system of equations:


Demand for $X$  = Supply of $X$
Demand for $Y$ = Supply of $Y$
Demand for $L$ = Supply of $L$
Demand for $K$ = Supply of $K$


where these demands and supplies are either exogenously given or are derived by solving utility maximization problem of the consumers, and profit maximization problem of the firm in a standard way.

Method 1: One way to solve the posted problem is to find these demands and supplies and solve the resulting system of equations. 

Method 2: Another way is to use first welfare theorem. First welfare theorem says that if the utilities are increasing then competitive equilibrium is Pareto efficient. In the posted problem, both the consumers have increasing utility function. So, we can use it to determine the competitive equilibrium prices. Equilibrium prices and allocation satisfy the following:


Efficiency in production: MRTS$^X_{L,K}$ = MRTS$^Y_{L,K}$ = $\frac{w}{r}$. Use this to derive Production Possibility Frontier (PPF).
Efficiency in consumption: MRS$^A_{X,Y}$ = MRS$^B_{X,Y}$ = MRT$_{X,Y}$ = $\frac{p_X}{p_Y}$.


Solution (using method 2): Given the data in question, we see that both the production functions exhibit constant returns to scale and the PPF will be of the form $4x + y =$  constant. Therefore, the price ratio $\frac{p_x}{p_y}$ in equilibrium will be 4 regardless of the initial endowments. This will be true as long as both the inputs $L$ and $K$ are available in positive quantities. Equilibrium can be fully determined once the details about endowments are specified. To find $\frac{w}{r}$ ratio we need to know the total endowment of labor and capital in the economy, and to find the absolute prices of $X$ and $Y$ given $w = 1$ we need the data on how much of the total endowment of labor and capital belongs to each consumer.