It takes years to become adept (and I will never use the word ‘master’ here because that implies there is a skill ceiling) at either medium. Focus on one as a primary and consider the other a hobby.
Currently I could do every area of 3D professionally (except animation, but that’s because I don’t spend much time with it when not necessary) but am primarily a rigger or technical artist. Years ago I got into programming to aid my rigging and become a technical artist, and I never stopped. Now the only things I can’t do in making a game is the audio and perhaps server programming beyond any development version.
It took me 7 years to get here and my programming still needs a lot of work.
The main thing you will discover if you get to this stage is that it’s pointless in some regards, unless you’re using both skills regardless of which medium you are working in (such as technical art) because you will never have the time to do all the art and coding in any half decent game unless you stop working to pursue your own projects or can maintain focus and interest for a very long amount of years.
For little projects/games though you can have a lot of fun when you know both areas.