It's not a major, it's a minor. The relative minor of B major is G# minor.
A flat minor is the relative minor of B major
The relative minor of E major is C# minor.
The relative major to c minor is Eb major.
Flatten the third and seventh notes in the scale. Therefore, if you're in the key of A major the notes are A, B, C#, D, E, F#, G#, A. Therefore, flattening the 3 and 7, you end up with A, B, C, D, E, F, G, A. By the way, Am is the relative minor of the key of Cmajor, which has no sharps or flats.
F major and its relative harmonic minor, D minor, have only b flat.
The relative major key of B minor is D major.
The relative major key to B minor is D major.
A flat minor is the relative minor of B major
The relative minor of D major is B minor.
G# minor
The relative major of G-sharp minor is B major. This relationship is established because the relative major key is a minor third above the minor key, which in this case means that B major shares the same key signature (five sharps) as G-sharp minor.
A major, E major, B major, F# major, C# major, and all their relative minors.
The relative major key of B minor is D major. It has a key signature of F# and C# and a raised 7th of A#.
The relative minors of key signatures are as follows: C major: A minor G major: E minor D major: B minor A major: F minor E major: C minor B major: G minor F major: D minor C major: A minor
The relative major is determined by two steps: counting three half steps higher and writing as an enharmonic equivalent using the name of three white notes above. In this case, three half steps higher yields A#/Bb. Counting three notes higher gives B. Therefore the key signature is equivalent to that of B flat major.
If I understand your question correctly: G minor has two flats, as does B flat major.
Relative major and minor share the same key signature but a different tonic note (a tonic note is the first note of the scale or in solfege tonic is DO). For example, D flat major has five flats in it's key signature and b flat minor has 5 flats in it's key signature; therefore, D flat major and b flat minor are relative.