No, Livorno is actually not that close to the five towns of the Cinque Terre. I would suggest you actually plan to stay at one of the towns for at least a night and use those two days to visit all of them. Then move on to Tuscany to visit other areas. I assume you will have enough time to visit the main sights? What period of the year are you coming?