I'm trying to prove that if $X$, $Y$ are homotopy equivalent then they are $n$-connected for the same $n$, without knowing about homotopy groups.
I am working with the second definition from https://ncatlab.org/nlab/show/n-connected+space that does not use homotopy groups.
I tried to show that if $X$ is precisely $k-1$ - connected, then so is $Y$:
Let $X, Y$ be homotopic. So we have $f:X\to Y$, $g:Y \to X$ with $g\circ f \approx id_X$ and $f \circ g \approx id_Y$
By assumption there is some $t: S^{k-1}\to X$ that is not extendable to some $\widetilde{t}:B^k \to X$.
Define $q:S^{k-1} \to Y$ by $q = f \circ t$. Assume towards contradiction that $q$ is extendable to some $\widetilde{q}: B^k \to Y$.
Then we can take $\widetilde{t}: B^{k} \to X$ by $\widetilde{t}= g \circ \widetilde{q}$.
By definition $\widetilde{t}(S^{k-1}) =g \circ \widetilde{q}(S^{k-1})$. But $\widetilde{q}$ is an extension of $q$, hence $\widetilde{q}(S^{k-1})= q(S^{k-1})$. This gives:
$$
\widetilde{t}(S^{k-1}) = g (\widetilde{q}(S^{k-1}))= g(q(S^{k-1})) = g(f(t(S^{k-1})))
$$
But $t(S^{k-1}) \subset X$ hence $g(f(t(S^{k-1}))) \approx t(S^{k-1})$, meaning that $\widetilde{t}(S^{k-1}) \approx t(S^{k-1})$.
(Equivalently we showed $\widetilde{t}\mid S^{k-1} \approx t$).
If instead of the homotopy equivalence at the end, i'll show equality, it will be a contradiction (An extension that was assumed to not exists).
I'm not sure how to show that equality (or is this attempt correct at all?).
I would say that you have made life more difficult by choosing a somewhat contorted proof strategy.
How about just proving this statement:
This statement implies, all by itself, that $X$ is $n$-connected if and only if $Y$ is $n$-connected, because you can apply the statement with the roles of $X$ and $Y$ swapped.
I'll stop here, because I suspect you can prove this statement, but I'm happy to continue if you want more help.