If you start with C major which has no sharps or flats and want to find a key which has 5 sharps, you simply have to go upward from C by perfect fifths (a perfect fifth is an interval which has 3 whole-steps and one half-step): C-G-D-A-E-B. This means that B major has 5 sharps.
If you want to find a key with 5 flats, you go from C downward by perfect fifths (C-F-Bb-Eb-Ab-Db). This means that Db major key has 5 flats.
In order to find minor keys, you just have to go from the note A because A minor has no accidentals. This means that the minor key with 5 sharps is G# minor and the key with 5 flats is Bb minor.
Or you could simply find the major key and then go downward by the minor third. This is another way to find minor keys.
So the exercise which would help you master the Circle of Fifths is this: in each key play Tonic (a three-note chord built from the 1st scale degree), Subdominant (built from the 4th scale degree), Dominant (built from the 5th scale degree) and Tonic chords in three voices with both hands which should be one octave apart.
First play the chords in the major key and then in the minor key (C-a-G-e-D-b-A-f# etc.) When you reach the key with 6 sharps, in your mind switch to the flat keys (F# major = Gb major). This way you will be able to come back to C major and the circle of fifths will be closed.
I will give you an example of the chords in C major and A minor:
C major: C-E-G, F-A-C, G-B-D, C-E-G.
A minor: A-C-E, D-F-A, E-G#-B, A-C-E (note that in any minor key, the Dominant chord always has to sound major - we raise the 7th scale degree to achieve that).
Practice this exercise tonight. This doesn't necessarily mean you will be able to master it in one day, but I think if you repeat this exercise this week, you should be able to see the real breakthrough. As a side effect, you will also master the three main chords in each key. This will prove very useful to you later on.