Quoted from Psalm 22:1. [See commentary on Matthew 27:46].
“Eloi, Eloi.” This is Aramaic, and a quotation of an Aramaic text of Psalm 22. C. S. Mann writes in The Anchor Bible: Mark: “The Greek Eloi, Eloi lama sabachthanei is the transliteration of an Aramaic original which can only be described as ‘Hebraized.’ …Presumably Mark’s community would be more accustomed to the Aramaic, and this would be reflected if Mark was using a Palestinian tradition. …Matthew has Eli, which is closer to the Hebrew form…it would appear likely that it was said in Hebrew, for the comment, ‘he is calling Elijah’ makes sense only if the cry was elei, elei, or eli, eli, rather than Mark’s eloi.”
So it seems most likely that Matthew, who originally wrote in Hebrew, correctly copied what Jesus spoke in Hebrew, while Mark translated what Jesus said into Aramaic and Greek.
“the ninth hour.” The ninth hour is 3 PM our time. [For the hours of the day and the watches of the night, see commentary on Mark 6:48]. According to the Hebrew text of Exodus 12:6, the Passover Lamb was to be slain “between the evenings.” The early evening started when the sun could clearly be seen to be falling and the day started to cool off, and the later evening was as the sun was going down or had just gone down. By the time of Christ, the Passover Lamb was slain at the 9th hour, about our 3 PM. Thus Jesus died at the same time the lamb was being slain in the Temple, just a few hundred yards to the west of the Mount of Olives where Christ was crucified.