You have the right idea, but the wrong value for p. It should be p = 7/2 = 3.5
You don't round up or down to the nearest whole number.
It is possible to have a decimal value for the amount of pounds or weight of an object.
If p = 3.5, then we use this to find 'a' to be...
a+p = 6.3
a + 3.5 = 6.3
a+3.5-3.5 = 6.3-3.5
a = 2.8
In summary, Joaquin bought 2.8 pounds of almonds and 3.5 pounds of pistachios.
We can check the answer by plugging a = 2.8 and p = 3.5 into a+p = 6.3 and you should end up with 6.3 = 6.3; also by plugging a=2.8 and p = 3.5 into 10*a+12*p = 70 to end up with 70 = 70. Both of these facts confirm the answer.