In AKG's post the function maps the element 2/3 to 2/3 just like it states here:
"Map each element that is not of the form 1/n (for natural n) to itself."
And secondly,
A=(0,1) B=(0,1]
the map f(x)=x is an injection from A to B, shmoe's identity mapping. Which part of that is causing confusion.
The map g(x)= x/2 is an injection from B to A.
Hence, by the Cantor, bernstein, schreoder theorem there exists some bijection between A and B.
go through it step by step; which part is the problem.
In general, there is bijection map from S to S' where S is any uncountable set and S' is S less a countably infinite set of points.
Let S' = S\{x_1,x_2,..}
since S' is infinite (otherwise S would be the union of {x_1,...,} and a finite set, there is a sequence y_1,y_2,... indexed by the natural numbers.
Define a map from S to S' via x_r is sent to y_{2r}, y_t is sent to y_{2t-1}, and every other element is sent to itself. This is a bijection between S and S'
The proof when S' is S less any finite number of points is left as an exercise.