Draw altitude AE
Then DE = (3 -1) / 2 = 1
And we have right triangle ADE with legs of sqrt 2 , 1 and the trapezoid height as the other leg
So
h = sqrt [( sqrt 2)^2 - 1 ] = 1
And we also have right triangle AEC where EC = 2
So
x = sqrt [ 2^2 + 1^2 ] = sqrt 5
Draw line \(AM\) so it is perpendicular to \(DC\)
Trapezoid \(ABCD\) is isceles, meaning \(DM = 1\)
Applying the Pythagorean Theoram to \(\triangle AMD\), we find that \(AM = 1\)
Applying the Pythagorean Theorem to \(\triangle AMC\), we find \(\color{brown}\boxed{x=\sqrt{5}}\)