Gasoline and petrol are both the same, as they are essentially referring to the same substance. Gasoline or petrol is one of the by-products during the refining of crude oil. It is a flammable liquid that consists of refined hydrocarbons.
In the past, most especially in some countries, gasoline was referred to as kerosene (one of the by-products of crude oil used as lamp oil). In other parts of the world, especially in the United States, the word gasoline is used mainly as a motor fuel. This means you can refer to any motor fuel as gasoline.
The word petrol is similar to gasoline, but it was formed mainly to be used as a brand name. Gasoline is an older word compared to petrol. The word petrol seems like the short form of petroleum, and it is commonly used in countries like the United Kingdom, South Africa, India, New Guinea, and other places.