You can get a "WiFi Extender" for those rooms. https://www.xfinity.com/learn/internet-service/wifi/xfi-pod There are lots of others on the market as well.
How can I boost the wifi in other rooms in my home?
Some tips for improving WiFi performance;
There are other options. Google for WiFi repeaters / range extenders, WiFi mesh systems / pods, powerline ethernet adapters, MoCA adapters. Good luck !