For the first sequence, consider the map f:Z⊕N→Z⊕N sending gn↦gn+1 where gn is the n-th generator of Z⊕N. This map is injective, since it simply reindexes identical free generators. Consider the map g:Z⊕N→Z which sends g1 to the generator of Z, and all other generators to 0. It is simply the 0-th canonical projection of Z⊕N, and hence is surjective.
This sequence is exact, since the image of f is Z⊕N, and the kernel of g is the same Z⊕N by construction. The image of g is Z, since it is surjective, and the kernel of f is 0, since it is injective.
For the second sequence we first reindex all generators by gn→g2n and then discard all even-indexed generators.