Because the distance A walked after the meeting was equal to that before the meeting, when A arrived at A, the distance B walked after the meeting was equal to that before the meeting.
That is, when they met, A walked 2 kilometers more than B;
So the speed of A is (20/2+1)/2=5.5(km/h),
The speed of B is (20/2- 1)/2=4.5(km/h).
Method 2
Let the speed of a be xkm/h and the speed of b be ykm/h.
2x+2y=20
2x-2y=2
solve
x=5.5
y=4.5