we need to solve the system of equations, there are different methods, I think here the simplest one is multiplying the first equation by 2 and then substract the second equation

Then, we have the equation

So, replacing P in the first equation

We can check our result replacing P=3.5 and D=3 in the second equation

Then, our answer is correct and P=3.5 and D=3