Mary started with 5 books and returned 3 so she had 5-3 = <<5-3=2>>2 books
She had 2 books and checked out 5 more books so she had 2+5 = <<2+5=7>>7 books
She now has 7 books but returned 2 so she has 7-2 = <<7-2=5>>5 books
She had 5 books and checked out 7 more books so she has 5+7 = <<5+7=12>>12 books checked out
#### 12