According to your definition, you need a function from

to

... But yes,

defined by

is a bijection for (a). Note that if 0 in considered a natural number (it varies by country

), then you need 2n+1, not 2n-1. You need to show that f is a bijection by proving that it is an injection and a surjection. Then, from a general theorem, you know that the inverse function exists and it is also a bijection. It is also easy to write this inverse function explicitly.

The set in (b) seems to be the set of squares of all natural numbers, so this tells you what the bijection is.