The judge put his camel with their camels = 17+1 = 18
the first takes half = 18/2 = 9 camels
the second takes one thirs = 18/3 = 6 camels
the third sone take ninth = 18/9 = 2 camels
so now we have 9 + 6 + 2 = 17 camels, and the remaining one the judge took it and left the sons.