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