Check to see if you have a bunch of housing slack by the rear brake. If you do, you could pull the wires, straighten any bends and then trim off the messed up part of the housing just above the levers.
Otherwise, replace.
The front doesn't look too long to me. But it is also a little bent.