I am also struggling with this question where I don't know how to use my knowledge of congruency to work out the length of the longer side.
I thought the longest side would be a+x but it was wrong. How would I work out the length for this square.
Question:

I just want to say that I'm assuming that x is the side length of the inner square even though it looks like another line was highlighted.
Let's call the smaller length of one rectangle w and the longer length l
So here are the formulas we know:
a=l+w
For x we can see that two upright triangles on either side of the square span out to length a therefore:
x=a-2w
Now all we need to do is solve the equation below by substituting a for its formula:
x=(l+w)- 2w
x+2w=l+w
x-w=l
However. This is not over. Because we have to do this in terms of x and a. We cannot use w. We can simply re-arrange the formula for x (x=a-2w) to do that.
w=(a-x)/2
Now we replace w in the 'final' equation with its formula:
x-((a-x)/2)=l