He used a $10 bill to pay for a bar that costs "p" dollars, assuming the bar costs less than $10, to determine how much change he will receive you have to subtract the price of the bar from the amount of money he paid for to determine how much change Nicholas will receive.
So the expression that represents the change he will receive is