p = (x + (x^2) - 1)*((y^2) - x + 3)*((y^2) - (x^3))

InputForm[Expand[p]]

Expand[p]