He made his mistake in Step 2. Tom should have subtracted 4/8 instead of 1/8. The mistake is that he was not consistent when he multiplied Denominators (bottom number) must be the same when handling fractions so Tom must multiply both the numerator and denominator by the SAME number to balance it out. 1/2 x 4/4= 4/8. Subtract. 7/8 - 4/8= 3/8. Tom has 3/8 of a gallon of paint leftover.
The answer would be 1/p^5q^0 so Brianna is correct. If you took it a step further, the answer would be 1/p^5 because any number (except 0) or variable raised to the zero power is 1.