I think a constructive approach like this might work:
First look at the integers of the form $3k+1$: They are $1,4,7,10,13,16, 19, 22, 25, 28, \dots$. Factor each of these, as far as possible, into smaller elements of $3\mathbb Z+1$. So $1=1,4=4,7=7,10=10,13=13,16=4^2, 19=19, 22=22, 25=25, 28=4\cdot7, \dots$. Enumerate the “prime-ish” elements of $3\mathbb Z+1$ — those that don’t factor into smaller elements: $a_1=1, a_2=4, a_3=7, a_4=10, a_5=13, a_6=19, \dots$.
Do the same thing for $4\mathbb Z+1$: $b_1=1, b_2=5, b_3=9,\dots$.
Let $f(a_i)=b_i$ and extend the definition of $f$ to all of $3\mathbb Z+1$ by requiring $f$ to be multiplicative.
I haven’t thought through whether there can be non-unique factorizations into the “prime-ish” numbers, so there are still details to work out or show.