Part 1: Which Should You Study More?
The answer? Both! If you get into the endgame and you study openings more, you will take your time doing nothing. If you study endgames more, you will run into a bad middlegame. If you are an ATTACKING PLAYER, I recommend you study the Lucena Position, Philidor, 1. e4, and black against 1. d4 would be the Kings Indian, and 1. e4 would be the Sicilian. I have not decided for DEFENSIVE PLAYERS, though Petrosian's play would be good to study. Anyways, get ready...
Part 2: Building An Opening Repetoire
Building it may seem hard at first glance, but transpositions should be studied. Depending on what middlegame you like, find the right openings. Start seeing if play is good. In fact, I also suggest something:
SAMPLE SAMPLE SAMPLE SAMPLE SAMPLE SAMPLE SAMPLE SAMPLE
Games Sorted By Opening:
Slav: Black WIns 35% | White Wins 47% | Draw 18% XX Ruled Out!
ANd SO ON
Part 3: What Endgames?
Learn EVERY endgame. One game I suggest is the game Pawn Play, where you play with pawns and kings, and other pieces if desired. All pieces start at the starting squares. Play! Your goal is to checkmate. DO this and study other endgames.