Solution (source code)

= Solution

At the return encounter, transmission from light to heavy multiplies the amplitude by $2/3$, giving a backward heavy-string pulse of amplitude $-8A_i/9$. Its speed halves, so its width returns to $w$. Reflection within the light segment multiplies the incoming amplitude by $-1/3$, giving a right-going pulse of amplitude $4A_i/9$ and width $2w$. The earlier $A_i/3$ reflected pulse is already farther along the heavy string.

The sketches show these as separate pulses in the short-pulse regime $w/20\ll0.10\,\mathrm s$. For longer pulses the corresponding components overlap and must be superposed rather than interpreted as isolated visible humps.