If you let x be the number of days from now, then the distance painted by the first group (in kilometers) is 4 + 1x, for the 4km already painted plus another 1km per day.
The second group has painted 1km and is painting another 4 km per day, so they can be represented as 1 + 4x. When both groups have painted the same amount, their work will be equal, so 4 + x = 1 + 4x. To solve, subtract 1 from both sides to get 3 = 3x. Now divide both sides by 3 to get 1 = x. This means they will have painted the same amount after another 1 day. To find how much they will have painted, plug the "1 day" that you found into one of the formulas, and get 4 + 1(1) = 4 + 1 = 5. This means that the group will have painted 5 km. You can verify that this solution is correct by plugging the "1 day" into the other formula, to get 1 +4(1) = 1 + 4 = 5.