Is it a good idea to use a Glass carboy as the primary fermenter? and a keg for the secondary?
Glass carboy as primary - Sure, as long as it's 6.5gal or larger for 5gal batches.
Keg as secondary? What kind of keg? 1/2 barrel keg - no, to much headspace. 5gal corny - sure, but it's easier to clean a 5gal carboy or 5 gal bucket...
Don't see why not. I use buckets & cornies. Just leave the batch in the carboy for 2 weeks after fermentation is done to let it clear.
Remember one unassailable statistic, as explained by the late, great George Carlin: "Just think of how stupid the average person is, and then realize half of them are even stupider!"
"I would like to die on Mars, just not on impact." Elon Musk