octal (base 8) representation uses the numbers 0 thru 7 and each "digit" represents sucessive powers of 8; thus,
127 (octal) = 7 x 8^0 (= 7)
+ 2 x 8^1 (= 16)
+ 1 x 8^2 (= 64) = 87 (decimal)

in your example, 5 + 15 = 22
translates to 5 + 13 = 18 in decimal

thinking about this in terms of successive powers of the base is transportable to binary, hexadecimal, base-13 or any other basis -- those of you familiar with Douglas Adam's "Hitchhiker's Guide to the Galaxy" will be comforted to know that 6 times 9 *does* equal 42... in base-13!