Give someone a dose of his own medicine

Give someone a taste of his own medicine / Give as good as one gets / Pay back in one's own coin


Rendere la pariglia


Meanings
Fig.: to treat someone the way he has treated you or others; to give back blow for blow

Examples
When the controversial and snobbish writer finally acquiesced in meeting the press, reporters gave him a taste of his own medicine by deserting his press conference
Quando lo scrittore tanto controverso e scorbutico acconsentì finalmente a ricevere la stampa, i giornalisti gli resero la pariglia snobbandolo e disertando la conferenza stampa

Louis thinks it's funny to call people up in the dead of the night, so we decided to give him a dose of his own medicine and last night we called him up every five minutes. I hope he learned his lesson
Luigi si diverte a telefonare alla gente nel cuore della notte, così abbiamo deciso di rendergli la pariglia e la notte scorsa gli abbiamo telefonato ogni cinque minuti. Spero che gli sia servito di lezione

Martha let John insult her for a few minutes, but then she gave as good as she got and shut him up
Marta si è lasciata insultare da Giovanni per qualche attimo, ma poi gli ha reso la pariglia e lo ha zittito ben bene

Origin
Since "medicine" carries a connotation of something disagreeable or bad-tasting, the origin of this expression is self-explanatory