If i understand correctly, you are looking for a polynomial in the indeterminate x whose coefficients belong to the polynomial ring with indeterminates d and e. You can define this as follows (assuming the numeral coefficients are rational numbers):