The degree a polynomial is determine by the highest highest power of variable in the equation.
However, for a multivariable polynomial, the degree is the highest sum of powers of different variables in any of the terms in the expression.
For this polynomial,
[tex]-56a^2y^3+23a^2y\text{ - 29a + 17}[/tex]The degree of polynomial is 5 at the term -56^2y^3 which has 2 and 3 exponent at variable a and y respectively.