I've been trying hard over this problem and I am unable to understand the exact technique to solve this problem. I've tried referring to the notes of my class but it seems that I might not have written it in my notes. The significant problem is to not know where and how to start.
If somebody can hint me a start then I think I might be able to solve this on my own. Any explanation would be appreciated.

To prove that a function of equivalence classes is well defined, you need to prove that for any two coset representatives, the value of the function applied to each is the same.