Did you copy this question properly? At the moment it looks like Joseph doesn't do any work, and so will never get the house painted.
Another way, using ratios:
John paints the house in 20 days, so paints of the house every day.
Joseph paints the house in days, so paints of the house every day.
Together, every day they would paint of the house every day.
So if we set up a ratio "amount : days"
So that means they would take days to paint the entire house. Since we are told that together they take 12 days, that means
So it will take Joseph 30 days.