Definition of weak homotopy equivalence Recall a weak homotopy equivalence is a continuous map $f:X_1 \rightarrow X_2$ that induces a bijection $f_*:[Y,X_1] \rightarrow [Y,X_2]$ for any CW-complex $Y$, where $[Y,X]$ denotes the homotopy class of continuous maps $Y \rightarrow X$. When $Y$ is restricted to be $\Bbb{S}^n$, this results in a series of isomorphisms between $\pi_n(X_1)$ and $\pi_n(X_2)$, and by Whitehead theorem it automatically becomes a homotopy equivalence when $X_i$'s are CW-complexes.
Why don't we define it in a similar way as homotopy equivalence, namely $(f_*)^{-1}:[Y,X_2] \rightarrow [Y,X_1]$ is induced by another continuous map $g:X_2 \rightarrow X_1$? Does the latter one necessarily implies homotopy equivalence? What will the difference of the two definitions change if we restrict $Y$ to be $\Bbb{S}^n$?

EDIT: Now that the question has been modified, this answer is no longer directly relevant.
The standard definition of weak homotopy equivalence is a map $f: X_1 \to X_2$ such that the induced maps on homotopy groups, for all choices of base point in $X_1$, are isomorphisms; see https://ncatlab.org/nlab/show/weak+homotopy+equivalence or https://en.wikipedia.org/wiki/Weak_equivalence_(homotopy_theory) or p. 352 in Hatcher. Your definition is stronger, and I think that it is equivalent to a homotopy equivalence: if $f_*: [Y, X_1] \to [Y, X_2]$ is a bijection for all $Y$, let $Y=X_2$; then there is a map $g \in [X_2,X_1]$ which maps to the identity on $X_2$, and that ought to be a homotopy inverse to $f$.
