Suggestions? “And, by the way, didn’t you say it was work related?” she asked. “I’m sorry, I didn’t want you to guess it. I thought that by saying that, I wasn’t totally lying (it is work related!) and, at the same time, your thoughts would be off track,” he responded.
"I'm sorry, I didn't want you to guess it. When I said that--well, it wasn't totally lying. It is work related! And at the same time, your thoughts would be off track."
the first one isn't needed at all... in fact, in most cases 'that' isn't needed... if you want to leave the first one in, you can change the second to 'it'... and, btw, parentheses don't work in dialog... plus, the whole 'i thought' sentence is a muddled mess that could use some simplifying...