Dear Student
Sponge and rubber band are solid but these are exceptions in the behaviour of solids. They can be easily compressed or stretched on applying force. But regain their original shape when force is withdrawn.
Sponge has air-filled holes in between and when we compress it, air inside it comes out and it is compressed. Air is trapped, when we press it, the air expels out and we are able to compress it.
A rubber band is an elastic material in nature. When stretched, it changes its shape and when the applied force is removed, it regains its original shape. That is why a rubber band changes its shape even though it is a solid. Also, if excessive force is applied then the rubber band would break.
Regards