p = amount of paper per pack
1 pack = p pieces of paper
5 packs = 5p pieces of paper (multiply both sides by 5)
Ron uses 5 packs, so there are 5p pieces of paper total. He uses all but 3 pieces, meaning that he uses 5p-3 pieces of paper. So that's why 5p-3 is the answer
----------------------------------------------------------
Here's a more concrete example
Let's say p = 10. In other words, let's say there are 10 pieces of paper per pack.
If that's the case, then 5 packs yield 5*10 = 50 sheets total. This is the same as saying 5p = 5*10 = 50. All I've done is replace p with 10. The letter p is simply a placeholder.
If he uses all but three sheets of paper, then Ron uses 47 sheets since 50-3 = 47. A more longer way to see this is to plug p = 10 into the expression 5p-3 and we get
5p - 3 = 5*10-3 = 50 - 3 = 47
which helps us confirm we have the right expression. I recommend you try other values of p to generate more examples. Make sure p is a whole number and that it is a positive number.
----------------------------------------------------------
Once again the answer is 5p-3