Answer
$a.\quad \left\{\begin{array}{l}
x\neq 1\\
x\neq-1
\end{array}\right. $
$ b.\quad$ Solution set = $\{-3\}$
Work Step by Step
Factor the denominators:
$\displaystyle \frac{2}{x+1}-\frac{1}{x-1}=\frac{2x}{(x+1)(x-1)}$
$a.$
The denominators in the equation must not be zero:
$\left\{\begin{array}{l}
x+1\neq 0\\
x-1\neq 0\\
(x+1)(x-1)\neq 0
\end{array}\right\}\Rightarrow\left\{\begin{array}{l}
x\neq 1\\
x\neq-1
\end{array}\right. \qquad(*)$
$b.$
Multiply both sides with the LCD,$\quad (x+1)(x-1)$
$(x+1)(x-1) \displaystyle \left[ \frac{2}{x+1}-\frac{1}{x-1} \right]= (x+1)(x-1) \left[\frac{2x}{(x+1)(x-1)} \right]\quad$ ... distribute and simplify
$ 2(x-1)-1(x+1)=2x\quad$ ... distribute and simplify
$2x-2-x-1=2x$
$ x-3=2x\quad$ ... add $3-2x$ to both sides
$-x=3$
$ x=-3 \quad$ ... satisfies (*), a valid solution.
Solution set = $\{-3\}$