I will give an elementary proof of the problem using the fact, that $T^2$ is a topological group and that its universal cover is contractible. We will start with some constructions in homotopy theory of topological groups, which are required to understand the proof given below and added here for convenience.
First note, that $\mathbb R^2$ forms a topological group under addition: $(x,y) + (x',y') := (x+x',y+y')$ and that $\mathbb Z^2$ is a discrete normal subgroup thereof. We identify $T^2$ with the quotient of $\mathbb R^2$ by $\mathbb Z^2$, so that $T^2$ again becomes a topological group under addition. Moreover the quotient map $p: \mathbb R^2 \to T^2$ becomes a group homomorphism and is easily seen to be the universal covering projection ($\mathbb Z^2$ discrete subgroup $\Rightarrow$ $p$ is covering projection; $\mathbb R^2$ is contractible $\Rightarrow$ $p$ is universal).
Next, we observe, that for $[f],[g]\in [(X,\ast),(T^2,0)]$ the sum $[f]+[g] := [f+g]$ is well defined, turning $[(X,\ast),(T^2,0)]$ into a group. The same arguments show that $[(X,\ast),(\mathbb R^2,0)]$ is a group under point wise addition of representatives as well (as is $[(X,\ast),(G,1)]$ for any topological group $G$ with unit $1$), and that the map $p_\sharp : [(X,\ast),(\mathbb R^2,0)] \to [(X,\ast),(T^2,0)]$ given by $p_\sharp([f]) := [p \circ f]$ is a group homomorphism.
Now $\pi_1(T^2,0) = [(S^1,1), (T^2,0)]$ is a group in two ways, by means of composition of (representatives of) loops $[\alpha], [\beta] \mapsto [\alpha \ast \beta]$ and by means of point wise addition of (representatives of) loops $[\alpha], [\beta] \mapsto [\alpha + \beta]$.
Both operations share the same unit, the (class of the) constant loop sending everything to $0 \in T^2$ and denoted simply by $0: (S^1,1) \to (T^2,0)$. We can also observe, that for any loops $\alpha, \beta, \gamma, \delta$ we have $(\alpha + \beta) \ast (\gamma + \delta) = (\alpha + \gamma) \ast (\beta + \delta)$. Therefore $$[\alpha]+[\beta] = ([\alpha] \ast [0]) + ([0] \ast [\beta]) = ([\alpha] + [0]) \ast ([0] + [\beta]) = [\alpha] \ast [\beta],$$
hence the two operations are in fact the same on $\pi_1(T_2,0)$. The same argument can be used to show the analogous statement for $\pi_1(\mathbb R^2,0)$ (or $\pi_1(G,1)$ for any topological group $G$ with unit $1$).
Now back to the problem:
Given two maps $\varphi, \psi: T^2 \to T^2$, such that for some point $x \in T^2$, we have $\varphi(x) = \psi(x) = x$ and $\pi_1(\varphi) = \pi_1(\psi): \pi_1(T^2,x) \to \pi_1(T^2,x)$, we want to show $\varphi \simeq \psi$, where the homotopy can be taken relative to $x$. Replacing $\varphi$ with $\xi \mapsto \varphi(\xi + x) - x$ and $\psi$ with $\xi \mapsto \psi(\xi + x) - x$ if necessary, we may assume $x=0$. It will then suffice to show, that $\chi \simeq 0$, where $\chi := \varphi - \psi$.
Since the induced map $\pi_1(\chi): \pi_1(T^2,0) \to \pi_1(T^2,0)$ on fundamental groups is trivial (this is where we need all the constructions for topological groups), we can lift $\chi$ to a map $\bar{\chi}: (T^2,0) \to (\mathbb R^2,0)$ with $\chi = p \circ \bar{\chi}$.
We now define $H: T^2 \times I \to T^2$ by $H(x,t) = p(t\bar\chi(x))$, which is easily checked to be the required homotopy $0 \simeq \chi$.
The loops $ab^{-1}$ and $ab$ are not homotopic.
Imagine the holes are instead pegs, like the left figure here:
Source:https://www.tinkercad.com/things/11tjAfAiQNw-two-pegs-two-holes
The loop $ab^{-1}$ is equivalent to an open loop $\mathsf{O}$ around both pegs. First, you wrap string around the pegs to make the shape of $ab^{-1}$; tie the start and end of the string into a knot at the base point. Then, notice you can simply nudge the string into an $\mathsf{O}$ shape without moving the base point knot or lifting up the string.
In contrast, the loop $ab$ is different. If you wrap the string around the pegs to make the shape of $ab$, you create a figure $\mathsf{8}$. There is no way to nudge the string into an $\mathsf{O}$ shape without moving the base point or lifting up the string over the pegs.
"Aren't they welded to the base point". Note that you are allowed to nudge any part of the string except the knot where the string starts and ends. The string is allowed to cross over itself and cross over the base point. If part of the string crosses over itself at the base point, you can still move that part; just don't move the base knot itself.
You can think about homotopies like this to help your intuition. When you make any loop out of string, try nudging the string without (a) moving the base point, or (b) lifting up the string over the pegs. The result is another homotopically equivalent loop, and all homotopically equivalent loops can be made in this way.
The pegs are obstacles. Wrapping a string around them creates a loop that you can't remove unless you lift that loop over the peg. In this way, just by recording which strings can be homotopically transformed into other strings, you can discover where the pegs are, even if the pegs are invisible. Thus this loop-wrapping approach (homotopy theory) uses strings within the space to reveal the invisible obstacles/holes outside the space.
Best Answer
Your confusion seems to be about the meaning of the word "generate". By definition, if $G$ is a group and $S\subseteq G$, then the subgroup generated by $S$ is the smallest subgroup that contains $S$. Since a subgroup always contains the identity element, any subset of $G$ (even the empty set!) "generates" the identity element.