Two waves of equal amplitude travel through the same string. The principle of superposition says the string's actual shape (red) is the point-by-point sum of the two (teal and purple). In phase (φ = 0) they reinforce into a wave of amplitude 2A; exactly out of phase (φ = π) they cancel. Slide the phase difference φ and watch the red resultant swell and vanish.
Two waves of equal amplitude A share the string — teal (y₁) and purple (y₂), phase-shifted by φ.