Working together, the job takes x hours to do.
If a lawn can be mowed with a push mower is 2 hours, then in 1 hour, you do 1/2 of the job.
If the same lawn can be mowed with a riding mower in 1 hour, then in 1 hour you do 1 job.
If the same lawn can be mowed by the two mowers together in x hours, then in 1 hour you get 1/x done.
1/2 + 1 = 1/x
3/2 = 1/x
x = 2/3
They take 2/3 of an hour. 2/3 * 60 min = 40 minutes.