Jesus departs a little from them. The text does not tell us if all heard what he spoke, but since we have a record of it, at least Nephi heard. Certainly others would have.
Two things are important in this prayer. The first is that Jesus thanks the Father for the Gift of the Holy Ghost that has been given to the people, and asks that it be given to all who believe.
The second is that Jesus prays to the Father. In the context of the prayer of the people directed to Jesus, he immediately models prayer, a prayer directed to the Father, and not to himself. One of the reasons for this prayer is to emphasize the new teaching about the Father. Thus, we have verse 23: “And now Father, I pray unto thee for them, and also for all those who shall believe on their words, that they may believe in me, that I may be in them as thou, Father, art in me, that we may be one.”
The people may have prayed to Jesus, but Jesus immediately modeled the way to pray to the Father, ending with the important declaration of his relationship with the Father.