I have this example in my text book:

Prove that (0,1]~(1,3):

Here is the answer provided:

We define two bijections:

f: (0,1]->(0,1) and g: (0,1)->(1,3), with

the word after x in the third row means "else" in English.

Can anyone explain how this thing got solved?

thanks