an other approach using covering space:
Let us observe the covering space $\mathbb{R}^2$ of $K^2$ when the covering map is the quotient map $\mathbb{R^2} / \{(x,y) \sim (x+1,y) , (x,y)\sim(-x,y+1)\} \mapsto K^2 $ by $p((x,y)) =[(x,y)] $. (The cover,might be thought as a paving of $\mathbb{R^2}$ with $K^2$'s which are "mirrored" with respect to x's axis).
Now for any loop $\gamma :(I,\partial I)\rightarrow (K^2, y_0)$ ($y_0$ denotes the bottom-left vertex of the polygonal representation of $K^2 )$. Let us denot $\tilde{\gamma} $ a lift of $\gamma$ to $\mathbb{R^2}$ such that $\tilde{\gamma}(0),\tilde{\gamma}(1) \in p^{-1}(y_0)$ because $\gamma$ is a loop. $\tilde{\gamma} $ is homotopic to concatenation of $\{\tilde{a_i}\}_{i\in [l_1]} , \{\tilde{b_j}\}_{j\in [l_1]}$ when $\tilde{a_i} , \tilde{b_j}$ are lifts of the loops $a,b$ to points on the grid $\mathbb{R^2} / \mathbb{Z}^2 = p^{-1}(y_0)$ . This is the part I'm not going to fully prove, but here is an intuitive sketch: (the red line is $\tilde{\gamma}$ which in $\mathbb{R}^2$ might be continuously stretched to the grid).

Now using the fact that $p_* : \pi_1(\mathbb{R}^2, x_0) \rightarrow \pi_1(K^2 , y_0)$ the cover map induced homomorphism is one-to-one. We get:
$$ p_*([\tilde{a_1} * ... * \tilde{a_{l_1}} * \tilde{b_1} * ... * \tilde{b_{l_2}} ]) = p_*([\tilde{\gamma}]) \Rightarrow [a]^{l_1} * [b]^{l_2} = [\gamma] $$