Convert dB/km to /km
Depending on the units of the loss coefficient \$\alpha\$, there are two ways to calculate optical loss in a fiber, or any other uniform medium.

For \$\alpha\$ in units of [1/length], 

$$
\frac{P}{P_0} = e^\left({-\alpha_{1/km} L}\right) 
$$

For \$\alpha\$ in units of [dB/length]

$$
{P \over P_0} = 10^{-\alpha_{dB/km} L/10}
$$

You can set these two expressions for \$P/P_0\$ equal to eachother, and solve algebraically,

$$
\ln(e^{-α_{1/km} L}) = \ln(10^{-\alpha_{dB/km} L / 10} )
$$

$$
-\alpha_{1/km} L = -\alpha_{dB/km} L / 10 \cdot \ln{10}
$$

Then, assuming that your units for \$L\$ are the same, (in this case, they are both km), cancel \$L\$.

$$
\boxed{\alpha_{1/km} = \alpha_{dB/km} \cdot \frac{\ln (10) }{ 10}}
$$

Putting your numbers in, 

$$
0.0507/\text{km} = 0.23 \cdot 0.22 \text{dB/km}
$$

As long as you have the same unit on both sides (km, m, lightyears, angstroms) this conversion ratio will always be \$\ln(10)/10\$. If you need to convert units, you will want to step through the algebra a little bit more carefully, particularly the penultimate step where you cancel out \$L\$.