Relative pitch is when you are in a key such as C major, and you can always find your way back to C because it is the root note. That is what solfege is used for. Relative pitch can be developed at any age. All you need to do to develop it is ear training.
When you listen to a song, try to find the root note of the song. The root note is the note that all of the other notes gravitate towards. If you are in C major, C is the root note. If you play a D, your mind will hear that it wants to go to C. If you play an E, you may hear it going E-D-C. The best way to develop your ear is to do solfege, play a lot of music and sing along, and also ear training apps.
If you sing everything that you play, your ear will develop very quickly. Solfege will also help. In your spare time, get an ear training app and use it daily. 10 mins a day is enough. My favorite app is Melody Ear Training for ios. It plays a series of notes and you play them back. You can choose to have it play within a scale. If you do this, it will help your relative pitch and transcription abilities. https://itunes.apple.com/us/app/melody-ear-training/id353949586?mt=8
Also, play a lot of music and try to figure things out by ear on your instrument. In time you will improve.