Please find an alternative:
Names default to here(1);
f = Expr( 1 + 2 );
g = Expr( 1 + 2 + 3 );
h = Substitute(Expr(A + B), Expr(A), NameExpr(f), Expr(B), NameExpr(g));
dt = NewTable("Sum", NewColumn("A+B", Numeric, Continuous, Formula(NameExpr(h))), AddRows(3));