You need to divide both numbers by 7 because you currently know how many gallons are pumped in 7 minutes, and we want to find out how much is pumped in one minute.
In order to have a unit rate, we must have a rate with a denominator of 1. Our rate is 42/7. To make this a unit rate, we need to divide the denominator by 7. What we do to the denominator, we must also do to the numerator; this means we have (42÷7)/(7÷7) = 6/1. This is a rate of 6 gallons per minute.