Question 378673
Keep in mind that since we're measuring heat and heat transfer, temperature needs to be measured in Kelvins as we can accurately measure the amount of heat and kinetic energy within the two mixtures.

50 F = 283 Kelvins (rounded to the nearest Kelvin)
70 F = 294 Kelvins

(283 Kelvins)*(4 gallons) + (x Kelvins)*(1 gallon) = (294 Kelvins)*(5 gallons)

As the units are consistent (Kelvins*gallons), we can solve this as a normal algebra problem and obtain x = 338 Kelvins, i.e. the temperature of the fifth gallon is 338 Kelvins, or 149 degrees Fahrenheit.

However, I solved the problem using the fifth gallon being water. If you're using a sugar mixture, it might have a different heat capacity but I anticipate no significant difference in heat capacity as the sugar is dissolved.