Answer :

AL2006
The first step in 'working' the equation is knowing the equation,
and writing it down. You're not even there yet.

I think this picture is saying that all the sides of the little squares are
all congruent ... all the same length ... and the distance from 'C' to 'D' is
two of them.

Also, the length of one of them is  x²-x+8 , and the length of another one
is  x²+2x-7. . . . the ones that are marked in yellow.

Well, what now ?  Do you think it might help if you knew the size of 'x' ?
Is there a way to find it ?

Remember . . . all the sides of all the little squares are marked congruent.
So both yellow pieces are the same length !

x² - x + 8  =  x² + 2x - 7

THAT's the equation you have to 'work'.  Now you're off and running !
Subtract  x²  from each side:        -x + 8  =  2x - 7

Add  'x'  to each side:              8  =  3x - 7

Add  7  to each side:            15  =  3x

Divide each side by  3  :        5  =  x .  

There you are.  Now you know what  'x'  is.  So you can find
the length of either yellow piece, and the length of  'CD'  is
just two of those.

I'm sure you can handle it from here.