The uniqueness property of tensor product $M ⊗ N$ of two $A-$modules $M$ and $N$ specifies the following:
for sake of simplicity we will write $M⊗N$ as $T$.
A tensor product of $M$ and $N$ is pair $(T,g)$ where $T$ is an $A-$module and $g:M × N → T$ is a bilinear map such that any bilinear map $f:M × N → P$ factors through an $A-$module homomorphism $h$ such that $f = h \circ g$.
uniqueness says that if you have another pair $( T',g' )$ then $∃ \ j: T \to T' $ an isomorphism s.t $g' = j \circ g$.
While proving this, we use the factoring property of tensor product for both $(T,g)$ and $(T' , g')$ to get maps $j$ and $j'$ s.t $g' = j \circ g$ and $g = j' \circ g'$.
Now to show $j$ is an $A-$module isomorphism, since $g' = j \circ g ⇒ g' = j \circ (j' \circ g') ⇒ g' = (j \circ j') \circ g'$ ,hence $j \circ j' =Id_{T'}$ and similarly, $j' \circ j = Id_{T}$, hence $j$ is an isomorphism.
my problem is with this statement $g' = j \circ (j' \circ g') ⇒ g' = (j \circ j') \circ g'$
how can we change the order of brackets when $g'$ is a bilinear map , $j ∈ End_A(T,T')$ , $j' ∈ End_A(T' , T)$ and we do not know if associativity is valid for whatever algebraic object(if any) these together live in.
The composition of three functions is always an associative operation. It doesn't have anything to do with additional algebraic structure.
You can prove it independently of any algebraic structure:
Given $W\xrightarrow{h}X \xrightarrow{g}Y\xrightarrow{f}Z$, then $(f\circ g)\circ h=f\circ( g\circ h)$
In our case it's just
$M\times N\xrightarrow{g'}T' \xrightarrow{j'}T\xrightarrow{j}T'$