Off[General::spell1];
Clear[BackSub,a0,b0];
BackSub[a0_,b0_] :=
Module[{a,b,x,k,sum, n},
  a = a0;
  b = b0;
  n= Length[b];
    Module[{i,j},
    x = Table[0,{i,n}];
    x[[n]] = b[[n]]/a[[n,n]];
    Clear[i,j,k];
    For[i=n-1,1<=i,i--,
      sum = 0;
      For[j=i+1,j<=n,j++,
        sum = sum + a[[i,j]] x[[j]] ]; 
      x[[i]] = (b[[i]] - sum)/a[[i,i]]; ]; ];
      Return[x]; ];
On[General::spell1];

A = N[{{3,-1,2,3},{0,-2,7,-4},{0,0,6,5},{0,0,0,3}}];
B = N[{20,-7,4,6}];
StringForm["A=``    B = ``", 
  MatrixForm[A], MatrixForm[B]]

X = BackSub[A,B];
TableForm[X]