In this case you can easily end up releasing more carbon by building the solar panels and all the machinery needed for sequestering the CO2 than you can actually effectively sequester within the effectively lifespan of your machinery.
You also need to take into account in the cost since each dollar (or any other unit of currency) has a carbon footprint on it's own based on the economy it was generated in.
There is a good reason why some things are not effective, viable or just plain stupid, otherwise you end up planning your freaking solar roadways or worse building them.
The guy that commutes in a coal rolling SUV pays more so he stops and buys an EV pickup instead.
The coal burning power station that he charges it with pays more so they get replaced with gas or solar or wind.
The company that ships the panels chooses between different shipping methods based on price, which includes a cost of carbon.
And so on. The magic of free markets (I'll end this sentence early since we're not doing politics this week.
Also solar has it's own carbon footprint, and not as small as people think.
The raw materials for these panels are mined, transported, the factories in China that make those panels use likely coal as their primary energy source, then the panels are transported again and again and again, and finally installed and maintained by people who likely don't show up to work in an EV.
You need to be very careful abstracting the true carbon footprint of anything and sadly too many people seem to ignore this fact.
Just because the item you buy and it's use is environmentally friendly it doesn't mean that the supply chain is.