God the Father has appointed Jesus Christ to judge humanity. Only He has ever lived a perfect life. In addition, He knows what it is like to be a human being and what difficulties His people have while living in this present, evil world (Hebrews 2:14-18). Thus, He is eminently qualified to be the Judge of all mankind.
Basic Doctrines: Eternal Judgment
Jesus would have had to have been with the Father to see the Father do these things. He even asserts Himself as having the powers that go with the Godhead: to raise the dead.
In verses 22-23, Christ is clearly asserting and affirming to those people that He is one of the Godhead. One is called the Father. The other is called the Son. The plural Elohim is simple to understand within this instance.
John W. Ritenbaugh
The Nature of God: Elohim
Other Forerunner Commentary entries containing John 5:22: