No it is most definitely not correct. You have confused the two-way proof.

First assume that such that .

In which case there is no need to constructgbecause you already have it assumed.

Now just go about provingfis surjective.

That part done, then assume thatfis surjective and go about constructinggsuch that .