Since f is one-one.
Hence every element 1,2,3 has either of image 1,2,3 (But different elements of f should not have same images)
Here in each case,
Every image has a corresponding element.
Hence, onto function.
f:{1,2,3}→{1,2,3} is onto.
Hence, proved.