You will probably want 2–3 days in Campeche City [1], to take in the city center as well as some of the outlying sights. Budget at least three days in the Río Bec area [2]—a full day for Calakmul [3] and Balamkú [4] and 1–2 days for the ruins near the town of Xpujil [5].
Having a car will make your visit to Campeche much more rewarding. You can access Campeche City by bus, but service to and around the Río Bec region is much too infrequent to be practical.
More and more travelers fly into Cancún [6] and rent a car for a couple of weeks, making a large counterclockwise loop hitting Mérida [7], Campeche [1], the Río Bec region [2], Chetumal [8], Tulum [9], and back up to Cancún [6].
Links:
[1] http://www.moon.com/destinations/cancun-the-yucatan/the-state-campeche/campeche-city
[2] http://www.moon.com/destinations/cancun-the-yucatan/the-state-campeche/rio-bec-region
[3] http://www.moon.com/destinations/cancun-the-yucatan/the-state-campeche/rio-bec-region/calakmul-archaeological-zone
[4] http://www.moon.com/destinations/cancun-the-yucatan/the-state-campeche/rio-bec-region/balamku-archaeological-zone
[5] http://www.moon.com/destinations/cancun-the-yucatan/the-state-campeche/rio-bec-region/xpujil-town-and-around
[6] http://www.moon.com/destinations/cancun-the-yucatan/cancun-cozumel-and-the-riviera-maya/cancun
[7] http://www.moon.com/destinations/cancun-the-yucatan/the-state-yucatan/merida
[8] http://www.moon.com/destinations/cancun-the-yucatan/cancun-cozumel-and-the-riviera-maya/tulum-and-southern-quintana-roo/chetumal
[9] http://www.moon.com/destinations/cancun-the-yucatan/cancun-cozumel-and-the-riviera-maya/tulum-and-southern-quintana-roo/tulum