View attachment 8649
The pink is the answer to the line above
Jx
You have 3 flats in the key signature - regardless of what then happens throughout the piece, the KEY SIGNATURE has 3 flats.
Your only 2 choices therefore (at grade 3) are Eb major or C minor.
The fact that the 7th is then raised in the piece itself is a big clue to it being a minor key rather than a major key. (almost always at this stage, if you find a raised 7th, you are looking at a minor key, you may also find a raised 6th occasionally)
In the scale of C minor: C D Eb F G Ab Bb C, the 7th note is Bb, but in your excerpt, the Bb are all raised to Bnaturals.
Looking further at the original question on your paper ... and considering the question you asked too ... your excerpt has Eb and Ab marked in it. No key signature (at grade 3) would be able to have these without the Bb too. If you work (backwards) around the circle of Fifths, a key sig with Bb comes before the key sig with Bb and Eb, which in turn comes before the key sig with Bb, Eb and Ab. therefore you would have to assume that Bb is in the key sig, and the Bb are all "natural-ed" in some way (ie raised as the 7th note in C minor)
(I realised after I typed the first paragraph, that you were given the black line as the question...)