The idealsum command computes a basis for the sum of ideals A and B. An optional argument P is the modulus, which should be a machine size prime.
A = [x-1, y^2]; B = [y]; idealsum(A,B); [-1+x, y]