Problem on Quotient Groups and First Isomorphism Theorem

Q: Let P be a partition of a group G with the property that for any pair of elements A, B of the partition, the product set AB is contained entirely within another element C of the partition. Let N be the element of P which contains 1. Prove that N is a normal subgroup of G and that P is the set of its cosets.

Sol: I am thinking of a surjective homomorphism f: G--> P with N as the kernel. Then N being the kernel is normal and G/N is isomorphic to P which implies P is the set of cosets of N in G.

My problem: P is a partiotion of G => there is an equivalence relation on G such that the elements of P are exactly the equivalence classes.

Now, if I define f: G--> P by f(a)= [a], where [a] represents the equivalence class of a,

then how can I prove [ab]=[a].[b] , i.e. f is a homomorphism?

Is my approach correct?

Please help.