When Hanuman set the entire Lanka on fire, how is it that Ashoka Vana escaped it. Was it because Hanuman put out the fire, or due to Sita's power or the fire did not reach there?
When Sita heard that Hanuman's tail was being ignited by the demons, she prayed to to the fire-god and fire didn't harm Hanuman in any way even he felt if a snow-ball is kept at the tip of his tail. Then, leaving the house of Vibhishana, Hanuman put fire on other houses. Also there is no mention that Hanuman put fire on Ashoka Vatika.
But, after seeing the city of Lanka blazing, Hanuman thought that Sita too might have lost her life. While thinking this, Hanuman sees some good omens and asserts himself that Sita can survive from the fire by her virtues of penance and devotion to Rama:
अथवा चारु सर्व अन्गी रक्षिता स्वेन तेजसा |
न नशिष्यति कल्याणी न अग्निः अग्नौ प्रवर्तते || ५-५५-२२
Or else, Seetha the auspicious lady, who is completely charming of her limbs and protected by her own effulgence, does not get destroyed. Fire does not indeed destroy fire!
न हि धर्मात्मनस्तस्य भार्याममिततेजसः।
स्वचारित्राभिगुप्तां तां स्प्रष्टुमर्हति पावकः।।5.55.23।।
Fire cannot touch that lady who is protected by her own chastity and who is wedded to the righteous man of immasureable glory.
नूनं रामप्रभावेण वैदेह्यास्सुकृतेन च।
यन्मां दहनकर्मायं नादहद्धव्यवाहनः।।5.55.24।।
Fire, the consumer of oblations who has the property of burning has not burnt me and this is surely on account of Rama's power and Vaidehi's merits.
And, Hanuma again visits Ashoka garden and sees Seetha there.
Ashoka Vana (Vatika) and house of Vibhishana remained unaffected because
Hanuman didn't put out the fire explicitly there
Both Fire-god and Wind-god were acting as per Sita's prayer (as mentioned in 4.53.32-33)
Valmiki Ramayan: Sundara Kanda: Sarga 53 - Sarga 56
Hanuman made sure that Asoka Van remained unaffected by fire after he realized that Sita could get hurt.
Gospel of Sri Ramakrishna / Volume 1 / In The Company Of Devotees:
So one should be careful about anger, passion, and greed. Take, for instance, the case of Hanuman. In a fit of anger he burnt Ceylon. At last he remembered that Sita was living in the Ashoka grove. Then, he began to tremble lest the fire should injure her.