In the two examples you give - I would use "this book" for one I had in my hand, and "that" book for one I was pointing at, further away. I think that is more or less the "rule": "this" is closer to you than "that" item... "that" is more abstract, may be not even there, just being talked about, where as "this" has to be in the space with you.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.