There are three methods to establish the new WiFi connection on your printer
Method 1 : WPS (If your router/modem has a WPS button)
In the Printers home screen, select Wireless LAN Setup (open Setup if needed). Select WPS and follow the onscreen instructions to connect to your printer
Method 2 : By connecting to Wireless network manually on your printer
For this you need to know your new WiFi Network and password. Once you have this, on your printer, open Wireless LAN Setup. Select Standard Setup. From the list of networks, select your WiFi network, enter password ***** asked and connect. Click OK and proceed. This will connect it to network.
Method 3 : Using your computer to setup WiFi on your printer
For this you need to download the Canon software.
Download the Canon printer software for your computer from this website --> https://www.usa.canon.com/internet/portal/us/home/support/details/printers/support-inkjet-printer/mg-series/pixma-mg5522
In the above website, click MG5500 series Full Driver & Software Package (Windows 10/10 x64/8.1/8.1 x64/8/8 x64/7/7 x64/Vista/Vista64/XP)
Download and open it. Now follow the onscreen instructions. When you get option to setup the printer through USB, LAN or Wireless choose Wireless or WiFi. Then follow the onscreen instructions to setup WiFi on your printer. This will allow you to save the WiFi configuration on to your printer directly from your computer.
Now try to print from your computer. Please let me know if that didn't work