That study is pretty controversial, it accounted for the energy of producing the battery pack, but not any savings due to recycling once complete, and uses some 5 year old battery production data. Their finding was 150-200 kilos of CO2 per KWh of battery, and Tesla's new factory is sitting at the 75-100 mark, with estimated 70% recycling efficiency.
Secondly, their Mileage -> CO2 math was way off, saying that an ICE vehicle could run for 8 years before it equaled the 17 tons of CO2 produced by making the Tesla's 100KWh battery pack. Considering 1 gallon of gas = 9 kilos CO2, that's ~1800 gallons of gas to offset the production of a Tesla battery in their estimate. I suppose that's 8 years if you only drive your car 5k miles/year.
Unfortunately though, the correct math is hard to figure out. Best estimate is that a brand new 100KWh battery pack is equivalent to burning 900 gallons of gasoline, and a recycled one is equivalent to burning 300. Depending on your driving habits and the car you drive, that can be 12k miles in 6 months, or 30k miles in 4 years. Of course, then you need to offset the CO2 production of whatever you're using for electricity, but that can range from 0 to a whole lot, so each individual would need to figure that out on their own.
That being said, battery production vs fuel consumption is only a small part of the equation. Producing a brand new car is still extremely dirty and wasteful, so scrapping a perfectly functional car to upgrade to a shiny new EV isn't helping anything. Lol.