They might be mimicking, mocking or parroting the person, more likely mimicking.

>**mimic**
>
>*verb*
>
>imitate (someone or their actions or words), especially in order to entertain or ridicule.

https://en.oxforddictionaries.com/definition/mimic