We know that there are two operations are used in semaphores
1) wait : It is denoted by P, It is used when some process enter into the critical section by decreasing semaphore value by 1.
2) signal :It is denoted by V, It is used when some process exit into the critical section by increasing semaphore value by 1.
So, in the question they are asking about value is decreasing from 10 to 7 so, there would be 3 P operations used..
And other possibility may be firstly 2 V happen, because of this value increases from 10 to 12 and then 5 P happen, because of this value decreases from 12 to 7..
so both B and D will be correct...