A basket contain green, black and blue balls in the ratio 5 : 2 :…