If you look at the base of the bulb I think you will notice that one of the pins on side of the base is lower than the other pin. That is so it only fits in the socket one way.
I would check your grounds. If the light on the other side of the RV works then probably the ground at the light that doesn't work has the bad ground. Could be the ground or the socket itself. If neither brake light works I would suspect the plug or socket in your tow vehicle.
Sometimes I have noticed the plug itself get corrodeded contacts. I have a utility trailer that I seldom use. My running lights will work but brake and turn signals don't work. I plug and unplug the socket into my PU several times and it usually corrects the problem. They have some contact cleaner in a spray can. Auto parts stores carry it. If all else fails I spray that on the contacts and plug and unplug the plug into my PU several times.