We are told that 2 gallons cost $8.40. To determine how much a quarter of a gallon costs we need first find the price per gallon. To do that we divide the cost over the number of gallons, like this:
[tex]N=\frac{8.40\text{ dollars}}{2\text{ gallon}}=4.20\text{ dollars/gallon}[/tex]Now we multiply the price by 1/4 gallons:
[tex](4.20\text{ dollar/gallon)(1/4 gallon)=}1.05\text{ dollars}[/tex]therefore, a quarter gallon costs $1.05