Big surprise ending!
The audience thinks they know how the strings get longer and shorter.
One stick has a long cord and the other a short cord.
When the magician pulls the short cord, the long cord simultaneously becomes short.
Repeat this unexplainable feat several times.
The audience thinks the cord is connected to the two sticks but magician separates the sticks.
The cord still moves as if they were connected.