You need three wires or the extension will not ring out, yours work cos you wired them all. You can use 2 wires if you're stuck but you need a master socket on the extension with a ring cap.
←
If you have DSL and are using filters on each of the sockets then you can get away with only two wires because the filters have a ring capacitor built-in. In fact the DSL signal will be improved if the RING wire is disconnected.