The lack of uniformity is what makes our legal system work. We are intended to by a government of the people, by the people and for the people. It would be silly to have uniform sentences for each crime... why not have robots enforce justice?
The different results in each case depend on a multitude of factors. Don't you think that the guys getting the harsher sentence probably had a greater history of violence? Would you feel the same way if the white guys had been known KKK members and had commited several similar acts in the recent past? Maybe the one who was let off easy had never been in trouble before, was gainfully employed and was taking care of 5 children? Shouldn't the judge be able to look at more than just the offense? Isn't there a difference in the trauma caused to a teenage boy vs. a teenage girl when taken advantage of by a teacher?
There are so many different considerations for the judge. To just arbitrarily pointing out two different instances where people received different sentences, without knowing more, does not show that there was any injustice or prejudice.
And BTW, your scenarios are contrary to the statistics. Just so you are aware, typically black males receive much harsher sentences for their crimes than white males.