I don't know what part you missed, but Azula didn't know Aang was alive. Zuko didn't know if Aang died but he did know that Katara had the Spirit Water. The same spirit water that the Moon and Ocean Spirits were in. The same Ocean Spirit that kill Zhoa. Putting one, two and, three together I'm sure Zuko kinda figured that Aang could be alive. Azula by the way does know Zuko and it wasn't untill Zuko showed doubt that Aang was died that she had some doubts. Plus unlike Azula, Zuko can't lie or doesn't know how to do a good job at it, hence Zhoa knowing Zuko was the blue spirit.
Going back to to the original question, "How did she know?" She didn't. She didn't tell the Fire Lord how the Avatar died untill she thought Zuko knew something. So she just planned for the "just in case he was", and unlike Zuko she don't need to earn her father's approval, she just conqured The Earth Kingdom, and she brought back Zuko and Iroh as instructed. She oblivously did more than had to do and had nothing to lose. She could afford to give Zuko the credit knowing it meant more to Zuko than it would to her and even if the Fire Lord would find out the truth she still looks good cause she almost killed aang and tried to give Zuko the credit.
I feel like I'm repeating what Azula said, but like I said, you must have missed something!