Take $\log_c$ of both sides of the equation:

$$ \log_c y=3\log_c a+\frac12\log_c b+1-\log_c 2.$$ 
And so,
$$\log_c y=3(3)+\frac12(4)+1-\log_c 2=12-\log_c 2.$$

Homework with logarithms
why when i comment \usepackage{geometry} i get error?

\documentclass{book}

\usepackage{geometry}

\makeatletter
\@ifpackageloaded{geometry}
 {                               % i the package was loaded 
    \newcommand*{\qw}{\itshape}  % this is enabled, else is not enabled.                                                                                               
 }{}
\makeatother

\begin{document}
\qw hallo
\end{document}

