Presumably you would only add this to the train cars not the track. Also electric motors can generally also act as generators so the additional costs on new cars would probably be minimal.
PS: Cars only weigh 85,000 lb or so which means you only need to store something like 10kwh depending on top speed.
I'm only going from the OP. The savings they describe seem minimal (6mil) whereas they are dealing with a notoriously expensive tube system. Carbon savings are great, but one should always ask if that same money might result in greater carbon reductions if spent elsewhere.
PS: Cars only weigh 85,000 lb or so which means you only need to store something like 10kwh depending on top speed.