I came across two different avatars of Vishnu for killing Bhasmasura while reading about Lord Shiva and lord Vishnu. In one tale Vishnu came as Brahmin to deceive Bhasmasura and in another he came as Mohini. Now can you clear my doubt with a reference?
One version of the story can be found in Śrīmad-Bhāgavatam (Bhāgavata Purāṇa) 10.88,
The Supreme Lord, who relieves His devotees’ distress, had seen from afar that Lord Śiva was in danger. Thus by His mystic Yoga-māyā potency He assumed the form of a brahmacārī student, with the appropriate belt, deerskin, rod and prayer beads, and came before Vṛkāsura. The Lord’s effulgence glowed brilliantly like fire. Holding kuśa grass in His hand, He humbly greeted the demon.