Take a look at the original sentence again:
Slouched in his seat, Michael tried to pay attention to the grammar
lecture the only problem was that NBA statistics
and images of pretty women in tight miniskirts were more interesting than
subordinate clauses and participle phrases.
You wanted to fix it this way:
Slouched in his seat, Michael tried to pay attention to the grammar
lecture, however the only problem was that
NBA statistics and images of pretty women in tight miniskirts were more
interesting than subordinate clauses and participle phrases.
To add a comma and a transition like however between lecture and the would create an equally bad problem, a comma splice. A comma splice occurs when you have two main clauses joined with just a comma. Michael tried to pay attention to the grammar lecture is the first main clause. The only problem was is the second main clause. The spot between lecture and the needs a stronger break than a wimpy comma and a mere transition.
You might want to consult the rules for fixing comma splices and fused sentences.
Go back to the sentence to try again.