>>>>If the judge sentences him to do a certain amount of time how can they change it after a plea bargain?
The gneral rule is that they cannot. Of course, there is always the possibility that there is something about the plea agreement that you do not know or underwstnqad. You should consult with local counsel.
>>>>I mean, if they had told him he would be classified as a class 5 felon he would have took it in front of a jury.
Again, only a local attorney with knowledge of your state's laws can assist him. If he used the PD, contact them.