Where p and x represent mass.
It suggests putting masses of one at points B and C, and finding an appropriate mass to put at A so that the center of mass will be at X.
When p=1/2, x=2/3, which means that P is the midpoint of AC and X is the centroid, but how do I extrapolate this information to determine a general formula for x in terms of p?

Hint: If you put two unit masses at $B$ and $C$ and a mass $m$ at $A$, then you can find the center of mass in two different ways:
1) put a mass of 2 at $M$ (which is the center of mass of $B$ and $C$) and then find $X$ as the center of mass between $M$ and $A$, so that $AX:XM=m:2$;
2) put a mass $m+1$ at the center of mass of $A$ and $C$ and then find $X$ as the center of mass between $P$ and $B$; this can work only if the center of mass of $A$ and $C$ is at point $P$, so that $AP:PC=m:1$.
From these two relations you can eliminate $m$ and find $x$ as a function of $p$.