Looks like the outer coil got cut or snapped so when the pedal was pushed the inner casing collapsed outward .
Not sure if you can buy individual cables , often Bumper to Bumper / Napa / Oreillys have parts like this so it is worth checking . a lot of the aftermarket stuff is the wrong length so be careful with that . AT least you can measure the one you have .