This section is one piece. The lawyer came up with this summary of the Old Testament law, not Jesus. Jesus didn't let it rest as mere belief, but told them that "doing" it was the key. That made the lawyer feel like he needed to justify himself. How many of us need to justify why we don't do what we know or say we believe?
Luke shows us what loving your neighbor looks like. It looks like caring for anyone who needs you. Jesus asked, "Who was a neighbor to this man?" Only one answer is possible: The one who showed compassion.
Luke then shows us what loving God looks like. It means soaking up Jesus words and spending time with Him . . . not serving Him! Everyone I know who has ever put church work before relationship with Jesus (and there have been many) usually come to that realization with a similar smugness and self-righteousness that Martha has here. Mary's part, love for Jesus, can never be taken away from her!