Since 1 gallon= 16 cups, to find out how many cups are in 3 gallons, you would do 16+16+16, each 16 added representing 1 gallon, and you would get 48 cups.
To find how many cups are in 5 gallons, you would use the same formula you did to find out how many cups are in 3 gallons. So, you would do 16+16+16+16+16, each 16 added representing 1 gallon, and you would get 80 cups.