When BP and EC are perpendicular, it means that triangle BDP is similar to triangle CEP.
So DP/BD=PE/PC.
X= 1 or 3 is solvable, so the coordinate of P when it is vertical for the first time is (1, root number 3).