The equation "5a + 5b = 135" is derived, representing the total distance covered by A and B in 5 seconds.