Always location and name your variables first. So, let's call:

- The number of books Ky has: #k#

- The number of books Grant has: #g#

- The number of books Jamie has: #j#

Next, we can write the three equations from the information in the problem:

**Equation 1:** #k = 3g#

**Equation 2:** #g = j - 6#

**Equation 3:** #k + g + j = 176#

First, solve Equation 2 for #j#:

#g = j - 6#

#g + color(red)(6) = j - 6 + color(red)(6)#

#g + 6 = j - 0#

#g + 6 = j#

#j = g + 6#

Next, using this result we can substitute #(g + 6)# for #j# in Equation 3. And using Equation 1 we can substitute #3g# for #k# into Equation 3. Then we can solve Equation 3 for #g#:

#k + g + j = 176# becomes:

#3g + g + (g + 6) = 176#

#3g + g + g + 6 = 176#

#3g + g + g + 6 - color(red)(6) = 176 - color(red)(6)#

#3g + g + g + 0 = 170#

#3g + g + g = 170#

#3g + 1g + 1g = 170#

#(3 + 1 + 1)g = 170#

#5g = 170#

#(5g)/color(red)(5) = 170/color(red)(5)#

#(color(red)(cancel(color(black)(5)))g)/cancel(color(red)(5)) = 34#

#g = 34#

Therefore, Grant has #color(red)(34)# books.

Now, substitute #34# for #g# in the solution for #j# we did previously and calculate the number of books Jamie has:

#j = g + 6# becomes:

#j = 34 + 6 = 40#

Jamie has #color(red)(40)# books

We can also calculate the number of books Ky has by substituting #34# for #g# in Equation 1 and calculating #k#:

#k = 3g# becomes:

#k = 3 xx 34 = 102#

Ky has #color(red)(102)# books

#k + g + j = 102 + 34 + 40 = 176#