The unnamed Israelis were minors, aged 17 and 16, at the time of the high-profile killing. One was given a life sentence; the other 21 years in jail.
Abu Khdair, 16, was forced into a car, then beaten and burned alive.
The court says 31-year-old Yosef Haim Ben David led the attack, but it is yet to rule if he was mentally competent.
Abu Khdair was killed in apparent revenge for the murders of three Israeli teens in the West Bank.
The killings were part of an escalating cycle of violence, culminating in a war between Israel and militants in Gaza.
Mohammad Abu Khdair's body was found in a forest in West Jerusalem on 2 July 2014, two days after the bodies of the Israeli teenagers abducted and murdered by Hamas militants that June were found.
In November, the Jerusalem District Court found that Ben David and the two youths had abducted the Palestinian at random as he stood on a road in East Jerusalem.
The youths then beat him unconscious in the back of a car being driven by Ben David, the judges said. One of the youths helped douse him with petrol while he was still alive, before Mr Ben David lit a match and set him on fire, they added.
The two youths confessed to the abduction in court, though one testified that he was not involved in the killing. Mr Ben David chose not to testify.
The judges found that Ben David, who was portrayed as the ringleader, had participated in the abduction and murder. But they said a formal verdict would be postponed until a psychiatric evaluation had been carried out.
Following Thursday's sentencing hearing, Israeli state prosecutor Ori Korb said: "The sentence imposed on the defendants reflects what we asked for and the barbaric and atrocious act."
But Mohammad Abu Khdair's father, Hussein, told reporters that the family would appeal against the lesser sentence given to one of the youths.
The case has been closely watched by Palestinians who often claim of prejudice in Israel's justice system, the BBC's Yolande Knell in Jerusalem reports.
A court in Jerusalem has handed two young Israelis lengthy prison sentences for the murder of Palestinian teenager Mohammad Abu Khdair in 2014.