In short you Can do these kind of question by Aufbau Principle ,
which electron have greater value of n+l , its energy will be higher.
1. n = 3 , l = 2 , then n+l = 5
2. n=4. , l= 0. , then n+l = 4
BTW Bro , dont call me sir , i am in High school , i think i'm your junior as you said that you have passed high school.