After a lot of discussion and Dumbledore trying everything to limit their sentence, James was sentenced to three years and six months since he resisted arrest, but had no knowledge about the Dursleys’ stand about magic and Lily was sentenced to five years in Azkaban due to the fact that she sent her son knowingly to be abused. Albus and James were dismayed, how Lily was punished, but there was nothing to be done.