To add an exception to a port in your firewall you need to get to your Control Panel either by clicking the control panel icon (in Windows 7/8) or start button at the lower left of your screen (Windows 10), then settings, Network & Internet, then scroll down an the bottam and click Windows Firewall. Once there click on "Allow an App or Feature through Windows Firewall" and you'll arrive at the allowed apps page. Click on Change Settings at the top then scan through the list of apps until you see which one you've been trying to use to connect them. If both the Public and Private network boxes are empty click them and grant it firewall exceptions. If that doesn't work you might want to post your question in the main Windows forum as they're much more familiar working with online security than I am.
I'm still confused as to why you're trying to connect via remote server when there's easier ways to get them on the same page. What is it you're trying to do with your phone and PC? If I know what the end goal here is I might be able to tell you how to do it without touching any security settings whatsoever