Let x be the number of days each group has painted and let y be the number of km each has painted.
We know that the first group already painted 3 km and that each day the paint 3 km, this means that the total km they have painted is:
We also knoe that the second group already painted 5 km and that the paint 1 km each day, then the total can be express as:
Hence we have the system of equations:
To solve it we substitute the value of y of the first equation into the second equation, then we have:
Plugging the value of x in the first equation we have that:
Therefore:
Each group have painted 6 km.
It takes one day for the groups to pain the same amount.