This is just a band-aid. Same with adding buses, lanes, trains, etc. When something goes wrong in software we usually try to resolve it by finding a root cause. There are a lot of cars on the roads. Why? People live far away from their work. Why? All the office buildings are in one central place. Why? ... Etc. The solutions to the root causes, whatever they are, are, unfortunately, a lot more complex and expensive th…
Your suggestion would have the opposite effect -- if you increase the cost of commuting, people will commute further to find cheaper housing to make up for the cash you just took away from them. If a person can't afford to live near their job already, taking more money from them (by taxing their commute) just makes all housing less affordable to them.
(There should probably be a "Paradox" label for this. It's a commonly cited argument that sounds plausible, but isn't)