Azumamiya didn't know that Hinagiku was dared by Miki and Risa to ask out a boy at Hakuou. The two implied this heavily at Hayate, just to get a kick out of hearing her stumble words at the butler. They weren't expecting her fired up attitude and her unbreaking determination.

Azumamiya didn't know about her loophole; a way for Hinagiku to get out of asking Hayate. The two idiots knew of it; they just weren't expecting her to take it.

No, he knew none of that. All he knew was that Katsura Hinagiku asked him out. And he said yes.