Sometimes logarithmic functions can be tricky. It's interesting that the measurement of power and intensity ratios is measured in dB. The B is for Bel, and this is the actual unit of measure we are using.
However, like the Farad, real-life units are a bit impractical, so smaller units are more common: microFarad. Hence, we normally use the deciBel for measurement, which is actually one-tenth of a Bel (deci=one tenth).
The formula is Log(dB) = 10 X Log(10) [P1/P0]. In simple terms, the deciBel change is equal to the logarithm (base 10) of the ratio of the two levels of power or intensity in question.
So, in the first case, the ratio of the two powers is 10 watts/5 watts. This ratio is 2.
Plug in the formula Log(dB) = 10 X Log(10) 2.
Use a calculator that has a log function or use the old-fashioned way and look the logarithm up in a table. You should find that the logarithm of 2 is equal to .301.
Now we have Log(dB) = 10 X .301, which is equal to 3.01.
Therefore the answer is approximately 3 dB, which is answer C. It appears that you are not calculating Log 2 correctly. The logarithm is not the same as the number; Log 2 =.301, not "2".
Similarly in the other question, the ratio is 3 watts/12 watts, or .25. The Logarithm of .25 is equal to -.602. This would make the actual difference in the two powers a -6 dB. However, the question asks for the magnitude of the difference, which is neutral for the plus or minus sign. Therefore, the correct answer is 6 dB, which is answer C.
I think where you are having a problem is in the calculation of the logarithm. If you have a calculator that has a LOG function, this will help.
Of particular interest, each time a signal is doubled in power, the dB gain is three. So, if you increase a power by eight times (doubling it thrice 1 X 2 X 2 X 2), then the dB gain is 3 + 3 + 3, or 9 dB. Similarly, each time you halve a power, the dB gain is minus three.
And, if you don't increase or decrease the power ratio, then the dB gain is zero.
I hope this helps. If not, we'll try it again from a different angle.