Without the bothering square parentheses, just taking into account we operate modulo $\,n\,$ : $3\cdot 5=3+5\Longleftrightarrow 3\cdot 5-3=5\Longleftrightarrow 3\cdot 4=5\Longleftrightarrow 12=5\pmod n$ $3\cdot 5=27\,\,\wedge\,\,3+5=11\Longleftrightarrow 15=27\pmod n\,\,\wedge\,\,8=11\pmod n$
So for the first case above, we need $\,12=5\Longleftrightarrow 7=0\pmod n\,$ , so not many options here...
In the second case, $\,12=27\pmod n\Longleftrightarrow 0=15\pmod n\,$, and also $\,8=11\pmod n\Longleftrightarrow 0=3\pmod n\,$
The second condition leaves us no option, and this option also fulfills the first one, so we're done.