Electric current flows on the outside surface of a wire, because the free electrons repel each other and are forced as far apart as possible. So if there's more surface, the electrons flow more easily - less resistance! The resistance of a wire is inversely and linearly proportional to its surface area,
R = p/A
where p is a constant which depends on the material, called the resistivity.
The wire is a very long cylinder, and a cylinder's surface area is equal to its circumference times its length.
A = C*L
The circumference is related to the diameter by C = pi*D, so
A = pi*D*L
So,
R = p/(pi) * 1/(D*L)
Since p is a constant (assuming the wires are the same material), if D goes up by a factor of 2, then L must go down by a factor of 2 to have the same resistance. So the length of wire B is 4 m/2 = 2 m.