$T=\frac{3\pi }{4}-\left( -\frac{\pi }{4} \right)=\pi \Rightarrow \frac{2\pi }{\left| b \right|}=\pi \Rightarrow \left| b \right|=2\Rightarrow \left\{ \begin{matrix} b=2\begin{matrix} {} & b\gt0 \\ \end{matrix} \\ b=-2 \\ \end{matrix} \right.$
$-1\le \sin 2x\le 1\Rightarrow -2\le 2\sin 2x\le 2\xrightarrow{+a}a-2\le a+2\sin 2x\le 2+a$
${{y}_{\max }}=2+a=5\Rightarrow a=3\Rightarrow a\times b=6$