Down operation means P ( wait) , it means if the value of semaphore variable is not negative, decrement the value by 1. If the semaphore variable is now negative, the process executing wait is blocked (i.e., added to the semaphore's queue) until the value is greater or equal to 1.
And Up operation (Signal ) V means : First increments the value of semaphore variable by 1. After the increment, if the pre-increment value was negative (meaning there are processes waiting for a resource), it transfers a blocked process from the semaphore's waiting queue to the ready queue.
Here P1 is performing up and P2 performing down operation.
if we start from P1, initially x ==0 , so after V(x) it's new value would be x==1
and for P2 , x==0 so it need to wait until x become 1.