Are Brahma, Vishnu and Mahesh present or these are just different forms taken by Brahman as per the action that needed to be performed?
How are your two questions contradictory? The trinity are present and are just the different forms of Brahman.
From the standpoint of duality, i.e. from the standpoint of objective Universe, the trinity of Brahma, vishnu and Shiva are understood as representing three phenomenons/functions of manifestation, preservation and dissolution.
But, from a higher standpoint, Brahman alone exist. It is Brahman who has manifested as Brahma, as Vishnu and as Shiva.
From the absolute standpoint of Brahman, Brahman alone exist. No duality, hence no independent creation exists.
So, it all depends upon from what standpoint, are you approaching the concept of trinity.
For reference, see Taittiriya Upanishad (3.1.1), which says, "Know that as Brahman, from which the Universe has manifested, in which it exists and into which it dissolves."