Complex sentence: Another legend is that once, as Vishnu and Brahma contested for superiority, Shiva appeared in the form of flame and challenged them to find his source.
Split into simpler sentences: Another legend is that once, Vishnu and Brahma contested for superiority. As they did so, Shiva appeared in the form of flame, and challenged them to find his source.