If the gum you swallowed were to actually stay in your stomach until it fully digested then it likely really would take up to 7 years for your stomach acid to digest the gum.
But when you swallow gum it doesn't stay inside your stomach until it's digested but instead the gum will come out in your poop.
So when you make your next bowel movement the gum will likely be in that bowel movement because whatever your stomach cannot digest right away leaves your stomach and comes out in your bowel movements.
So if you swallow some gum it's not gonna digest at all and will eventually within the same day or a few days later come out in your poop.