How to use Views Page + Attachment to show parent and children nodes?
It sounds like you're getting stuck messing with relationships in the view - this shouldn't be needed to do what you're trying to do.  You can accomplish this with these basic settings:

Lesson: All your lesson fields + term reference to category

Exercise: All your exercise fields + term reference to category

Your view's page display just needs to be set up to display content of type lesson.  

The part that I think you're missing is setting the contextual filter.  


Add the contextual filter Content: Has taxonomy term ID
Provide default value -> Taxonomy Term ID from URL


Your attachment should be set to show the exercise content type.  Add the same contextual filter to this display and make sure you have inherit contextual filters checked.

This will give you a page that displays the lesson, followed by all exercises tagged with the matching category.