Always start by assigning the variables in the problem names.

Let the length be x, and the width be y. Then we are told that x=y+2, and

the diagonal is 10cm, so by Pythagoras' theorem:

100 = x^2+y^2 = (y+2)^2+y^2,

so:

2y^2 + 4y - 96 = 0

which is for you to now solve.

RonL