Hi, i am from Houston, Texas, I played Texas Holdem for 5 years
in your case, AAAQQ and AAA55 are both full house, called "Ace full house".
If both hands have Ace Full house, we will look at its pair, called "kickers", obviously the kicker Q will beat kicker 5. AAAQQ win.
you can ask me for more questions.