Since the average weight of a coconut is 2.22 kg less than a watermelon, its average weight is
Let n be the number of coconuts and watermelons. The total weight of n coconuts and n watermelons is

If we want this total to be 140, we have

So, you have 20 coconuts and 20 watermelons.