well, first of all such a homomorphism must be a homomorphism of additive groups.

since 1 generates Z, it suffices to consider what h(1) is, for such a homomorphism h. in particular, <h(1)> must be a subgroup of Z/30Z.

so let's look at the additive subgroups of Z/30Z:

<0> = {0}

<1> = <7> = <11> = <13> = <17> = <19> = <23> = <29> = Z/30Z

<2> = <4> = <8> = <14> = <16> = <22> = <26> = <28> = {0,2,4,6,8,10,12,14,16,18,20,22,24,26,28}

<3> = <9> = <21> = <27> = {0,3,6,9,12,15,18,21,24,27}

<5> = <25> = {0,5,10,15,20,25}

<6> = <12> = <18> = <24> = {0,6,12,18,24}

<10> = <20> = {0,10,20}

<15> = {0,15}

but since h must also be a multiplicative homomorphism, we need h(k) = h(k*1) = h(k)h(1), that is: h(1) must be the (unique!) multiplicative identity of h(Z). so if h(Z) = Z/30Z, for example, we have to have h(1) = 1.

this severely cuts down on the number of possible ring homomorphisms.

for example, we can't have h(1) = 2, since we must have h(1) = h(1)h(1), but if h(1) = 2, h(1)h(1) = 2*2 = 4.

it is clear that each additive subgroup can have at most one multiplicative identity. some trial-and-error shows that 16 is such an identity for <2>. so we need to verify that:

if h(1) = 16, that h(km) = h(k)h(m).

h(km) = h(km*1) = km*h(1) = km*16 (mod 30).

h(k)h(m) = h(k*1)h(m*1) = (k*h(1))(m*h(1)) = km*256 (mod 30) = km*16 (mod 30) (since 256 = 16 (mod 30)).

so so far, we have 3 ring homomorphisms: h(1) = 0, h(1) = 1, and h(1) = 16.

let's continue: what we are looking for, for each image h(Z), is an element a with a^{2}= a. this simplifies the trial-and-error, all we need to do is square each element of h(Z). so let's look at <3>:

3^{2}= 9

6^{2}= 6 <--bingo!

9^{2}= 21

12^{2}= 24

15^{2}= 15 <--bingo!

18^{2}= 24

21^{2}= 21 <--bingo!

24^{2}= 6

27^{2}= 9

so the multiplicative identity of <3> can only be 6,15, or 21. since 3*6 = 18, it's not 6. since 15*6 = 0, it's not 15. therefore it must be 21, so h(1) = 21 is our 4th homomorphism.

can you take it from here?