I assume you are starting to learn about trig. I'll just do a quick solution and if you need clarification you can ask.
First find the angle from the positive x-axis to point P. By convention we call it
(pronounced "theta").
We know that
so
.
To find x, we evaluate
.
So, x=1/2