Giving back material in chess games is usually difficult for beginning chess players. Beginning chess players often grab material, and then only grab more. And that is okay, except that learning to give back material at the right moment can actually let you win more chess games more easily.
In this game, my opponent was thinking, and I guessed that he would want to attack my queen. Since I already was material ahead I figured that I could sacrifice my queen with 17.Qb8xf8, and then actually stay material up in a different dynamic way.