Here is the item again:
If his friends walked into the bookstore
(A) Boris
had a stack of car magazines as camouflage,
(B) but he
was really reading Better Homes and Gardens, studying decorating
ideas (C)
to spruce up his first apartment.
You correctly realized that a comma must follow bookstore. If his friends walked into ... is a subordinate clause. When a subordinate clause introduces a main clause, you connect the two with a comma.
To fix the problem, you chose to do this:
If his friends walked into the bookstore,
Boris had a stack of car magazines as camouflage,
but he was really reading Better Homes and Gardens, studying decorating
ideas to spruce up his first apartment.
You have correctly employed Punctuation Rule 2:
Subordinate Clause + , + Main Clause.
Excellent choice!