Now any correspondence between a,b and p,q (of which there are 2!) and any correspondence between c,d,e and r,s,t (of which there are 3!) will take the unique non-edge to the unique non-edge, so there are 2!*3!=12 such isomorphisms. In particular, 12>0 so there _are_ isomorphisms.
More generally, call the number we're trying to compute F(n,k). If k>1, let's first choose where one element goes -- that's n+k possibilities -- and then for each choice we have to take the remaining k-1 different elements to the remaining (n+k)-1 = n+(k-1) different elements (not n+k, because we want the function to be 1:1. So we get an equation
F(n,k) = (n+k) F(n,k-1).
BY INDUCTION, we know what F(n,k-1) is; it's (n+1)....(n+(k-1)). That together with the above equation gets us the formula we want for F(n,k).
If you said "and so on" in your proof, you were almost certainly hiding an induction on k there. Which is fine, but you should realize it.
If we break into 2 groups, we could get 5=1+4 in 5 ways, e.g. {{a},{b,c,d,e}}, and 5=2+3 in 5*4/2 ways, e.g. {{a,b},{c,d,e}}.
If we break into 3 groups, we could get 5=1+1+3 in 5*4/2 ways, e.g. {{a},{b},{c,d,e}}. Or 5=1+2+2 in 5*3 ways, e.g. {{a},{b,c},{d,e}}.
If we break into 4 groups, we get 5=1+1+1+2 in 5*4/2 ways.
In 5 groups, the only way is with each one in her own group.
So 1+5+10+10+15+10+1=52.
For all y\in Y, pick an x such that y = f(x), using ontoness. Then g1 o f (x) = g2 o f(x) = g1(y) = g2(y). Since this was for all y\in Y, g1=g2. QED.
Not onto => not epi, want to show that there exists a bad g1,g2 with g1 o f = g2 o f but not g1=g2.
Let b \in Y such that no x\in X has f(x)=b, using not-ontoness. Let Z = {1,2}. Define g1:Y->Z by g1(y)=1 for all y\in Y. Define g2:Y->Z by g2(b)=2, but g2(y)=1 for all y \in Y other than b.
Then for all x\in X, g1(f(x)) = 1 = g2(f(x)), since f(x) is not b. So g1 o f = g2 o f. But g1(b) = 1, g2(b) = 2, so g1 is not g2. QED.