In whose name was Jesus baptized?
The baptism of John was for repentance. This was not as much an immersion in the name of a person but a public declaration of sorrow for sin and the change of thinking associated with repentance.
Matthew 3:7 But when he saw many of the Pharisees and Sadducees come
to his baptism, he said unto them, O generation of vipers, who hath
warned you to flee from the wrath to come?
Mark 1:4-5 John did baptize in the wilderness, and preach the baptism
of repentance for the remission of sins. And there went out unto him
all the land of Judaea, and they of Jerusalem, and were all baptized
of him in the river of Jordan, confessing their sins.
Luk3 3:3 And he came into all the country about Jordan, preaching the
baptism of repentance for the remission of sins;
John understood that Jesus, having no sin, did not need baptism for repentance.
Matthew 3:14-15 But John forbad him, saying, I have need to be
baptized of thee, and comest thou to me? And Jesus answering said
unto him, Suffer it to be so now: for thus it becometh us to fulfil
all righteousness. Then he suffered him.
There was a tradition of "baptism" for the inauguration of a priestly career.
Leviticus 8:6 And Moses brought Aaron and his sons, and washed them
with water.
The idea that Jesus was being baptized for a type of priestly work can be given some support considering his age.
Numbers 4:35 From thirty years old and upward even unto fifty years
old, every one that entereth into the service, for the work in the
tabernacle of the congregation:
Luke 3:23 And Jesus himself began to be about thirty years of age,
being (as was supposed) the son of Joseph, which was the son of Heli,
It may be that the baptism of Jesus was diverted into a priestly baptism or it may be that it was diverted into a special declaration by God of the ministry of his son.
Luke 3:22 And the Holy Ghost descended in a bodily shape like a dove
upon him, and a voice came from heaven, which said, Thou art my
beloved Son; in thee I am well pleased.
It does not appear that Jesus was baptized for the remission of sins or into anyone's name.