First, in order for to exist, f must be "onto". That is, for every y in B there must be x in A such that f(x)= y. Otherwise we could not define . If f were not "one-to-one", there would be some y in B such that for both and in A, . In that case we would have both and , contradicting the fact that is a function.
f being a homomorphism means for all and in A. To show that is a homorphism, you must use that to show that for all and in B. I suggest you start by defining, for given and in B, and .