Issues with syntax procedural structures inside module

Hello, I am a beginner, I’ve written a method to calculate the unknown

arriere[D_, R_] := Module[{n, a, b, x},
      a = D;
      b = R;
      n = Dimensions[a][[1]];
      
      For[j = n, j >= 1, j--,
        If[ a[[j, j]] == 0 , Break[]]
          x[[j]] = b[[j]]/a[[j, j]];
         For[i = 1, i <= j - 1, 
     i++
                 b[[i]] = b[[i]] - a[[i, j]]*x[[j]];
          ];
        ];
      {x}];[/i][/i][/color]

but it returns me only the values ??of the input

k = {{1, 2, 3}, {0, -3, -6}, {0, 0, 1}}
l = {1, -3, 0}[/color]
arriere[k, l]
arriere[{{1, 2, 3}, {0, -3, -6}, {0, 0, 1}}, {1, -3, 0}]
In[1]:= calcularriere[d_, r_] := Module[{n, a, b, x},
   a = d;
   b = r;
   n = Dimensions[a][[1]];
   For[j = n, j >= 1, j--,
    If[a[[j, j]] == 0, Break[]];
     x = b/a[[j, j]];
    For[i = 1, i <= j - 1, i++,
      b = b - a[[i, j]]*x
     ]
    ];
   x];
k = {{1, 2, 3}, {0, -3, -6}, {0, 0, 1}};
l = {1, -3, 0};
calcularriere[k, l]

Out[4]= {20/3, -20, 0}

No space in name calcul arriere.
D is the derivative function name in Mathematica.
Dimensions[ a ] returns a list of all dimensions {3,3}.
No extra [ ] after variables.
Semicolon between each two expressions.

I hope this is correct and helps you.

Please use a more descriptive subject heading in future.