Answer: 8 hours
Step-by-step explanation:
Let's say we measure the job in terms of square feet. So let's say the house is 320 square feet.
If Dan can dust the house in 8 hours on his own, then his unit rate is 320/8 = 40 sq ft per hour.
After 4 hours, he can dust 4*40 = 160 sq ft of the house. This leaves 320-160 = 160 sq ft for Mary to handle.
Her unit rate is (160 sq ft)/(4 hrs) = 40 sq ft per hour. It's a coincidence that the two people happen to have the same unit rate (that won't always be the case). Because her unit rate is identical to Dan's rate, this means she takes the same amount of time to get the job done if she works alone.
Side note: this all assumes that the two workers do not hinder one another, or get in each others way, in any fashion. So in a sense, they split up the house down the middle.