Hi there!
Let the number of gallons in the truck be represented by x.
When we multiply the amount of gallons(represented by x) in the truck, by the price price per gallon ($4), the outcome must be $50 (since this is the total amount of money spend to fill the truck).
We get the following equation:
$4 * x = $50
In mathematical language
4x = 50
Divide by 4
x = 50 / 4 = 12.5
Therefore, there are 12.5 gallons of gas in the truck.