Formula for amplitude of volatge, decibell
Power is \$\dfrac{V^2}{R}\$ therefore (assuming the two R's are the same) the ratio of powers in this form becomes: -

Power ratio = \$\dfrac{V_O^2}{V_I^2}\$ = \$(\dfrac{V_O}{V_I})^2\$

The "square" becomes a multiplier outside of the log hence the 2 multiples by the 10.

For example log(\$x^2\$) = 2log(x)