Scattering description of Andreev molecules