The circuits are equivalent because they have the same connections between the same elements. In each diagram look at the circuit elements connected to node a, and in each diagram look at the circuit elements connected to node b. In both cases the same elements have the same connections so the circuits are the same regardless of how they are drawn.