in the emergence of Christian Trinitarian doctrine. This happened through such people as Philo, who mixed Jewish and Greek ideas around the time of Christ:
Philo of Alexandria (c.20 BCE—40 CE)
Philo of Alexandria, a Hellenized Jew also called Judaeus Philo, is a figure that spans two cultures, the Greek and the Hebrew. When Hebrew mythical thought met Greek philosophical thought in the first century B.C.E. it was only natural that someone would try to develop speculative and philosophical justification for Judaism in terms of Greek philosophy. Thus Philo produced a synthesis of both traditions developing concepts for future Hellenistic interpretation of messianic Hebrew thought, especially by Clement of Alexandria, Christian Apologists like Athenagoras, Theophilus, Justin Martyr, Tertullian, and by Origen. He may have influenced Paul, his contemporary, and perhaps the authors of the Gospel of John (C. H. Dodd) and the Epistle to the Hebrews (R. Williamson and H. W. Attridge). In the process, he laid the foundations for the development of Christianity in the West and in the East, as we know it today. Philo’s primary importance is in the development of the philosophical and theological foundations of Christianity.
...
Though Philo’s model of creation comes from Plato’s Timaeus, the direct agent of creation is not God himself (described in Plato as Demiurge, Maker, Artificer), but the Logos. Philo believes that the Logos is “the man of God” (Conf. 41) or the shadow of God that was used as an instrument and a pattern of all creation (LA 3.96). The Logos converted unqualified, unshaped preexistent matter, which Philo describes as “destitute of arrangement, of quality, of animation, of distinctive character and full of disorder and confusion,” (Op. 22) into four primordial elements:
For it is out of that essence that God created everything, without indeed touching it himself, for it was not lawful for the all-wise and all-blessed God to touch materials which were all misshapen and confused, but he created them by the agency of his incorporeal powers, of which the proper name is Ideas, which he so exerted that every genus received its proper form (LA 1.329).
http://www.iep.utm.edu/philo/Notice the similarity to the beginning of John's gospel, written a few decades later, which equates Jesus with 'The Word' - Logos, and who is claimed as being an essential participant in Creation, with 'God' working through him.
The New Testament doesn't normally place the 'Holy Spirit' as part of any trinity (no word like 'trinity' ever appears, and the closest to the concept is the ending of Matthew, and the last verse of 2 Corinthians: "May the grace of the Lord Jesus Christ, and the love of God, and the fellowship of the Holy Spirit be with you all". However, it's notoriously easy for a copyist to tack on their own ending to their source, and so it's quite possible these post-date the rest of their books. In
the Martyrdom of Polycarp (happened around 155AD, written some time later) we see the grouping of the Holy Spirit with 'Father' and 'Son' - in the middle of passages.
The promotion of the Holy Spirit to the new concept of a Trinity happens more than a century after the New Testament was written, when Christianity had spread around the Mediterranean.
It was Tertullian who both first used 'Trinity' (in Latin) and talked about 'three persons, one substance', around the start of the third century AD. But before this,
Middle Platonism had developed ideas of a triad god in the writing of Numenius and Albinus, both 2nd century AD. Also at the start of the third century, we have
Origen of Alexandria, who takes this idea of a triad from Middle Platonism and explicitly uses it for the Christian Trinity.
Greek philosophy and theology, of course, was influenced by other religions and cultures over the centuries. But the idea of an 'ultimate' originating Person, and a mediating 'Word' or 'Mind' and then a 'World Soul' or 'Spirit' that are also Persons that should be regarded as a triad, that the Christian trinity expresses, is most closely similar to the (non-Christian) Greek ideas of Platonism that were around about 50 years before Christian theologians suggested them.