In case polynomial contains two or more variables then we calculate the sum of powers of the variables to evaluate the degree. This can be explained with the help of an example: Suppose we have a polynomial of the form F (x, y) = 4 x4 y3 + x6 + 4 y5 – 8 x y2 + 54 xy + 7x. In the given expression we can - not directly declare the degree of polynomial as 6 which is obtained by judging the expression x6 in the polynomial. In fact the sum of powers of x and y in all expression individually has to be evaluated to get the final degree of the polynomial. So, in the given polynomial we have the following summations of powers:
4 x4 y3 = 7,
x6 = 6,
4 y5 = 5,
8 x y2 = 3,
54 x y = 2
so the degree is the largest which is 7 of the term 4 x4 y3
in your example
x^2 2
y^5 5
7 0
so 5 is the degree here