Interestingly, Oneness Pentecostals do not fail to see a distinction between Father and Son as many suppose. The United Pentecostals explain the distinction of Father, Son and Holy Spirit as follows: "God is Father in creation, Son in redemption, and Holy Spirit in sanctification." Note however, that the distinction is in what God is doing and how he is doing it, not in person-hood.
The doctrine of Oneness denotes that there is only one God who manifests/reveals/expresses Himself at various times in various ways. This is in contrast to Trinitarian doctrine which sees God as always having existed as three separate and distinct persons, though one God.
One United Pentecostal theologian, David Bernard, in his book, the Oneness of God, points out that Scripture uses the term Son when referring to Jesus' humanity, never His divinity. Thus, they see a distinction between Father and Son in terms of humanity. Jesus the Son says He is one with the Father, in the Father and the Father is in Him. They therefore see one God existing simultaneously on Earth in the Son and in heaven as the Father.
Having established that background, in Matthew 3:16-17, God is in the Son, who is getting baptized. God speaks from heaven as Father, addressing His Son. God also alights upon the Son, in the likeness of a dove. But He is only one God simultaneously in three places, doing three things, in three different ways.
omnipresence of God in mind we can understand the baptism of Christ
very easily. It was not at all difficult for the Spirit of Jesus to
speak from heaven and to send a manifestation of His Spirit in the
form of a dove even while His human body was in the Jordan River. The
voice and the dove do not represent separate persons any more than the
voice of God from Sinai indicates that the mountain was a separate
intelligent person in the Godhead.
The rest of what he writes in regard to Jesus baptism is found on page 172-175 of his book, The Oneness of God.
There are various Oneness adherents, and even various Pentecostal Oneness groups. I have answered based on the doctrines of the United Pentecostal Church.
See also my answer to a related question:
How do United Pentecostals and other Oneness groups interpret Hebrews 2:9?