Let $ABC$ be a triangle and $M$ be the midpoint of $BC$. Squares $ABQP$ and $ACYX$ are erected. Show that $PX = 2AM$. 
$\textbf{Question:}$ Let $ABC$ be a triangle and $M$ be the midpoint of $BC$. Squares $ABQP$ and $ACYX$ are erected. Show that $PX = 2AM$.

I could solve this problem using computational techniques but I am looking for purely synthetic solution. I tried drawing some extra midpoints, connected them. But still couldn't find the solution.
Any kind of hint or full solution both are appreciated.

To rotate a vector around some point in the plane by $\alpha$ it's the same to rotate this vector by $\alpha$ around the tail of the vector.
Let $R^{\alpha}(\vec{a})$ be a rotation of $\vec{a}$ by $\alpha$.
Thus,  $$R^{90^{\circ}}(\vec{AD})=R^{90^{\circ}}\left(\frac{1}{2}\left(\vec{AB}+\vec{AC}\right)\right)=\frac{1}{2}\left(\vec{PA}+\vec{AX}\right)=\frac{1}{2}\vec{PX}$$ and we are done!
