Wikipedia cites many sources that might be of interest. Ignatius of Antioch ca A.D. 110 in "Ignatius's Letter to the Magnesians", Ch. XIII, wrote "Do we not have one God, and one Christ, and one gracious Spirit that has been poured out upon us, and one calling in Christ?"
This shows that some understanding of God as three-fold, though less developed, was present very early in the Church.
This site quotes many Bible verses that are often used to substantiate the idea of the Trinity:
One verse is 2 Corinthians 13-14:
14 May the grace of the Lord Jesus Christ, and the love of God, and
the fellowship of the Holy Spirit be with you all.
And another Matthew 28:19:
19 Therefore go and make disciples of all nations, baptizing them in
the name of the Father and of the Son and of the Holy Spirit...
The general approach that is followed is to use the "one God" verses that are prevalent throughout the Bible to stress the unity and other verses to show the distinctness of the persons of the Trinity. Each is shown to be worthy of worship, whereas humans and angels are not.
The Book of Job is the oldest book in the Bible and is structured carefully along Trinitarian lines. Thus Job represents the suffering servant, and the prophecies and insights of Wisdom he receives are primarily about the ministry and events in the life of Jesus and enlighten the mind to truth, as Jesus is the Way, the Truth and the Light.
- Job 9 - Savior is divine (can walk on water) but also a man (the Daysman)
- Job 13:15-16 - A savior who delivers us from evil
- Job 14:13-17 - A healer who renews our health & obtains safety from God's wrath
- Job 17:3; 33:22-26 - A liberator who pays the ransom to set us free
- Job 17:13-16; 33:27-30; 38:17 - A guide who knows the road to Sheol and can free us from the grave
- Job 19:23-27 - A redeemer who raises the dead to life
- Job 21:31 - A judge who "denounces their conduct to their face" and "repays them for what they have done"
- Job 23:10,13 - A refining fire who purifies us and makes us "pure gold"
The speaker who followed Job and his friends is Elihu, and he speaks for the Holy Spirit:
I thought, ‘Age should speak;
advanced years should teach wisdom.’
8 But it is the spirit in a person,
the breath of the Almighty, that gives them understanding. (Job 32:7-8)
Elihu even speaks about being new wine in a wineskin about to burst, an analogy that Jesus later used to refer to the effect of the Holy Spirit entering a person.
For I am full of words,
and the spirit within me compels me;
19 inside I am like bottled-up wine,
like new wineskins ready to burst.
20 I must speak and find relief;
I must open my lips and reply. (Job 32:18-20)
Elihu spoke to Job's heart and soul, to comfort, lovingly correct, and encourage with the truth that God loves him.
He loads the clouds with moisture;
he scatters his lightning through them.
12 At his direction they swirl around
over the face of the whole earth
to do whatever he commands them.
13 He brings the clouds to punish people,
or to water his earth and show his love. (Job 37:11-13)
Then at the end, God speaks from the Whirlwind and speaks about the creation, His fatherly provision to all His creatures of their physical needs and the final judgment.
Mind, heart, physical needs - each person of ther Trinity plays a distinct role, but all cooperate to accomplish this.
To doubly emphasize the Trinity, each of Job's three friends is antagonistic, but their opposition is varied, and each aims his barbs at ideas of Job's related to a different member of the Trinity. For example, Job cries out for a savior who has the power of God (able to help) but also the compassion and tenderness to not terrify him (a "son of man"). In his final speech, Bildad explicitly mocks the idea that one can trust for help in a "son of man":
How then can man be in the right before God?
How can he who is born of woman be pure?
5 Behold, even the moon is not bright,
and the stars are not pure in his eyes;
6 how much less man, who is a maggot,
and the son of man, who is a worm!” (Job 25:4-6)
I could go on and show the connection to the other two friends, but this should be enough. The distinctions between the members of the Trinity run all the way back to the first book in the Bible to be written, and pop up from then on to the end.