The starting price of a taxi in a city is 16 yuan (i.e. 8 yuan for driving less than 3 km). After driving more than 3 km, an additional 3.1 yuan will be charged for driving 1 km, and the part less than 1 km will be counted as 1 km. One day, Xiao Li and her father pay 31.5 yuan for taking a taxi. How much is the distance?

The starting price of a taxi in a city is 16 yuan (i.e. 8 yuan for driving less than 3 km). After driving more than 3 km, an additional 3.1 yuan will be charged for driving 1 km, and the part less than 1 km will be counted as 1 km. One day, Xiao Li and her father pay 31.5 yuan for taking a taxi. How much is the distance?

31.5-16 = 15.5 yuan
15.5 △ 3.1 = 5 (km)
5 + 3 = 8 km