Suppose (a1,…,an)∈/PARTITION. By correctness of the reduction the constructed instance does not pack into two bins, and since OPT≥2 always, OPT≥3.
An approximation algorithm returns a feasible solution, i.e. a legal packing, and a legal packing cannot use fewer bins than the optimum. So
ALG≥OPT≥3>2,
and step 3 rejects.
Conclusion. The algorithm decides PARTITION in polynomial time (the reduction is polynomial, A is polynomial by definition, the comparison is constant). But PARTITION is NP-hard, so NP⊆P, i.e. P=NP.