The answer is 18.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

Draw $\overline{BP}$ and $\overline{CP}$ and note that $\angle PBC=30^\circ$ and $\angle PCB=30^\circ$ . Note that $\angle PDE=\angle PBD+\angle BPD=\angle DPE+\angle BPD=\angle BPE$ . So $\triangle PBE\sim\triangle DCP$ which implies ${s\over 12}={(x+7)\over s}$ or $s^2=12(x+7)$ .

Note that $\angle PBC=30^\circ$ , so $\cos 30^\circ=\frac{(5+7+x)/2}{s}=\frac{1}{2}\sqrt{3}$ . Hence $3s^2=(5+7+x)^2$ .

Combining these two equations gives $(5+7+x)^2=36(x+7)$ . Solving this equation for x and discarding the negative solution, gives $x=18$ .