Answer:
Person A will take 4,67 days
Person B will take 28 days
Explanation:
They both paint the house in 4 days, then in one day they will paint 1/4 of the house.
Let call "x " number of days person B takes to paint neighbor´s house, and in one day B will paint 1/x
Then person A would take x/6 to paint the same house, and in one day A will paint 1/x/6 or 6/x
According problem statement they both A and B took 4 days painting the house, therefore
1/x + 6/x = 1/4
( 1 + 6 ) /x = 1 /4
( 1 + 6 )*4 = x
7*4 = x
x = 28 days
So person B would take 28 days
And person A would take 28/6 or 4,67 days