Jesus is really God. Indeed, He is the one LORD Jehovah manifest in the flesh. The bible claims this strongly “God was manifest in the flesh”, “The Word was made flesh”, “as the children are partakers of flesh and blood, he also himself likewise took part of the same”.
He was fully God (Son of God) and fully man (Son of man).
As God he forgave sins, healed the sick, calmed the sea, commanded nature, walked on water, was worshipped by angels.
As man he felt hungry, tired, painful, sad, distressed, troubled, tempted (YET WITHOUT SIN).
The very term “Son” means God “in flesh”. So, Jesus is the visible “image of the invisible God” -Col 1:15
Then why did Jesus pray? To whom did he pray?
Now since it is already established that Jesus was fully God and also fully man, we need to understand his human nature. He felt pain, hunger, sorrow and joy.
Ps 65:2 “O thou that hearest prayer, unto thee shall all flesh come.”
Similarly, as a flesh he had to pray to the Spirit of God (even though the Spirit of God dwelt in Him in fulness).