The earliest passage to set the three names side by side is in the Maitri Upanishad, and it does not yet hand out jobs: it says the one being has three portions, and it pairs Rudra with darkness, Brahma with passion and Vishnu with purity. Scholars are careful to say this maps Brahma onto the guna scheme without making him a member of a working trinity. That working trinity is a Puranic construction of roughly the fourth to twelfth centuries, when the Vishnu Purana states the three cosmic functions together and the Kurma Purana repeats that the three are one. Kalidasa, in the fourth or fifth century, already assumes the idea when he writes of a single form divided three ways whose members trade places in rank.
For Shaiva theology the three are not separate gods at all. Brahma, Vishnu and Rudra are forms that Shiva takes, and the Agamas map them onto three of his five faces: Sadyojata brings forth the world, Vamadeva keeps it, Aghora draws it back. Creation, in this reading, is simply Shiva looking in one direction.
What is different here:
Shiva is the whole; the three functions are three of his five faces, so Brahma has no independent existence.
Vaishnava schools mostly do not accept the trinity as a doctrine even though the Vishnu Purana shows Vishnu becoming Brahma and Rudra. Madhva's Dvaita places Shiva below Vishnu; Sri Vaishnavism holds that every major god is a form Vishnu takes. Brahma is then a created being working under Vishnu, which is why so many Vaishnava temple legends humble him before Vishnu.
What is different here:
The concept is not acknowledged; Vishnu alone is supreme and the other two are subordinate or derivative.
Shakta texts keep the three functions but give them to goddesses: Mahasaraswati creates, Mahalakshmi sustains, Mahakali destroys. This Tridevi does the work; Brahma, Vishnu and Shiva stand beside them as helpers.
What is different here:
The functions belong to the Tridevi; the male gods are auxiliary.
The Smarta tradition associated with Adi Shankara worships five deities (later six) as equal manifestations of the one Brahman and lets each worshipper choose a principal. The trinity is accepted as one way of naming aspects of that single reality rather than a hierarchy.
What is different here:
All three, with other deities, are equal forms of Brahman; the worshipper picks a chosen deity.
Kalidasa's Kumarasambhava (as quoted on heritage blogs)
Pan-IndiaAll traditions
Two Tamil-heritage blogs render a verse in which one form divides itself into three and the three take turns at being senior: sometimes Shiva before Vishnu, sometimes Vishnu before Shiva, sometimes Brahma before both. A second invocation praises the one who was alone before creation and then split to share out the three gunas. Neither site gives a canto number.
What is different here:
A poetic statement of the same idea, older than most Puranic passages; verse reference UNVERIFIED.
Sources: Trimurti — Wikipedia; Trimurti — New World Encyclopedia; Brahma — Wikipedia; Kalidasa on gods — Tamil and Vedas (blog); Kalidasa Part VII: The great integrator — Indica Today; Trimurti — Encyclopaedia Britannica