ОДЗ: \(\left\{ {\begin{array}{*{20}{c}}{x > 0,}\\{x \ne 1}\end{array}\,\,\,\,\,\,\, \Leftrightarrow \,\,\,\,\,\,\,x\, \in \,\left( {0;1} \right) \cup \left( {1;\infty } \right).} \right.\)
\({\log _x}4 = 2\,\,\,\,\,\,\, \Leftrightarrow \,\,\,\,\,\,\,{\log _x}{2^2} = 2\,\,\,\,\,\,\, \Leftrightarrow \,\,\,\,\,\,\,2{\log _x}2 = 2\,\,\,\,\,\,\, \Leftrightarrow \)
\( \Leftrightarrow \,\,\,\,\,\,\,{\log _x}2 = 1\,\,\,\,\,\,\, \Leftrightarrow \,\,\,\,\,\,\,{x^1} = 2\,\,\,\,\,\,\, \Leftrightarrow \,\,\,\,\,\,\,x = 2.\)
Ответ: 2.