How could Gechazi talk with the king? He needed to be alone, outside the city, due to his Tzara'as!
Malbim (verse 1) said that this is not written in order. Perhaps this was before Gechazi was stricken. 1 (PF)
Perhaps this was soon after Gechazi was stricken, before a Kohen declared him Tamei. E.g. if he was stricken during a festival; a Kohen does not look at Tzara'as until after the Regel (Nega'im 3:2).
The king and Gechazi did not follow the Halachah. Gechazi and his sons were the Metzora'im outside Shomron (Sanhedrin 107b), who were together, against the Halachah! However, perhaps then they were permitted to stay together due to mortal danger due to Machaneh Aram or hunger. (PF)
The woman returned after the hunger ended. Gechazi was already stricken when Aram besieged them (he was among the Metzora'im outside Shomron - Sanhedrin 107b), during the hunger! Perhaps that was a different hunger. (PF) Abarvenel - the king saw Gechazi's Tzara'as, and asked about it; amidst this, Gechazi talked about Elisha's wonders. (He holds that this was after Gechazi was stricken; he must hold like one of the other answers. Refer to 8:4:1:2-3.)