It takes Gary 1 hour to milk all the cows. 1 hour per job ==> 1 job per hour.
It takes Dana 1.5 hours. 1.5 hour per job ==> 1/1.5 job per hour.
Working together, they can do (1/1 + 1/1.5) job per hour.
To add these fractions, put them over a common denominator:
(1/1 + 1/1.5) = (1.5/1.5 + 1/1.5) = (2.5/1.5) = 5/3 job per hour.
5/3 job per hour ==> 3/5 hour per job.
3/5 hour = 36 minutes.