give a dose of own medicine

give somebody a dose/taste of their own medicine

to do the same bad thing to someone that they have often done to you, in order to show them how unpleasant it is She's always turning up late for me so I thought I'd give her a taste of her own medicine and see how she likes it.
See also: dose, give, medicine, of