Let j be the number of books that Jim has, c for Charles books, and b for Bob.

The word equation can be written as the following set of linear equations:

j = 3 x c

c = 2/3 x b

And they give you b = 27

So

c = 2/3 x 27

Doing this the very long way :)

= 2/3 x 27/1 ... make 27 an improper fraction (27/1)

= (2 x 27) / (3 x 1) ... multiplication of fractions means multiply numerators and denominators together

= (2 x (3 x 3 x 3)) / 3 ... factorizing 27 into 3 x 3 x 3

You can divide 3 from both numerator and denominator

2 x 3 x 3 = 18

So Charles has 18 books

And

j = 3 x c

= 3 x 18

= 54

So Jim has 54 books

Check your factorizations here:

http://statsfiddle.info/Primes/PrimeFactors/27