This was in a school textbook? Good grief.
I saw a video a while back with Al Gore trying to pull a similar stunt, using a large glass jug.
The Earth doesn't have a plastic or glass cover around it to trap heat. Greenhouses have a plastic or glass cover to trap heat. Clouds don't trap heat. Gases don't trap heat. There is no such thing as a "Greenhouse Gas".
Did you write a pleasant letter to both your child's school and the textbook publisher?
Clouds do trap heat - a clear winter night is going to get 10 to 20 degrees colder where I live than a cloudy one.
But they don’t trap heat the way a plastic bag does.