The formula with 3 substituted
US gallons = 3 ÷ 3.785411784 = 0.793
The constant is an exact definition, not a rounded factor: the mile is 1.609344 km, the US gallon is 3.785411784 litres and the imperial gallon is 4.54609 litres. The Litres to Gallons Converter explains where each comes from and gives a longer table.
3 litres is 0.793 US gallons and 0.660 imperial gallons. The imperial gallon is 4.54609 litres against the US gallon's 3.785411784, which is why the two answers differ by a fifth.
What 3 litres means in practice
3 litres is 0.793 US gallons or 0.660 imperial gallons. As an engine size it is the territory of six-cylinder sedans and the turbocharged V6s in modern pickups.