Endowments & Utility Function to get Demand Function We have two people, $A$ and $B$, A has $200$ units each of both good $X$ and $Y$ and $B$ has $100$ units each of both good $X$ and $Y$.

$A$ has tastes providing a utility function such that $u(X,Y) = y + 50 \ln x$ and $B$ $u(X,Y) = y + 150 \ln x$.

Given competitive equilibrium prices $p$ and $p_1$, how do I derive each person $A$ and $B$'s demand functions for both goods?
I agree, it is hard to tell how to answer the question because I don't know what "competitive equilibrium" means. But, if I assume that it means that given prices, the consumption decision of each person is optimized and such that market clearing conditions hold, then you can solve using the following. Solve for the optimal $x_i, y_i$ in each of the following. 
Solve
$$ \max_{x_a,y_a} y_a+ 50 \ln x_a \\ s.t. \;  p_x x_a + p_y y_a \leq 200 p_x + 200 p_y $$
for person A, and
$$ \max_{x_b,y_b} y_b + 150 \ln x_b \\ s.t. \;  p_x x_b + p_y y_b \leq 100 p_x + 100 p_y $$
for person B. Use the method of Lagrange multipliers. The inequalities will hold with equality. Then, to pin down a solution, normalize the price of one good, say, by letting p_x = 1. Then apply the market clearing conditions (you'll only need to use one of them)

$$ x_a + x_b = 300 \\ y_a + y_b = 300.$$

(This gives the Walrasian (competitive) equilibrium in the general equilibrium framework.)
Marginal utility_A\Marginal utility_B=P_1/P_2
-> Solve for quantity B
Y=p_1A+p_2B
-> plug the equation for Q_2 (B) into the equation for Y. 
-> that's your demand function