let string be $ baabab$
$WxW^{r}$ can be considered as ba ab ab $i.e. here$ $W$ ∈ $ba$ & $x$ ∈ $ab$ OR
b aaba b $i.e. here$ $W’$ ∈ $b$ & $x’$ ∈ $aaba$
$i.e.$ $start$ $and$ $ends$ $with$ “$a$” $or$ “$b$”
therefore, $L$ = { $a(a+b)^{+}a$ $\cup$ $b(a+b)^{+}b$ }
CROSSCHECK: try “bababa”, it should not be satisfy and “bababb” should satisfy