Jacob rode his bicycle 8 km in 2 h, stopped to change a flat tire, and then completed his trip by riding 4 km in 1.2 h.

What was his average cycling speed for his entire trip?