Lets say that dealer is selling at the rate of 100 per kg.

Since the shopkeeper measures 20% more...he buys at 100 per 1.2 kg(he paid 100 per kg but got 100 per 1.2kg )

Hence the shopkeeper bought at 100 per 1.2 kg or 83.33 per kg.

Now shopkeeper sells at 100 per .8 kg(frauds by 20%)

100 per .8kg is 125 per kg

hence, per kg shopkeeper has profit of 125-83.33=41.66

Profit percentage= % %