How to access classes in theme of a plugin?

Relying on code which is in other plugins and themes is problematic. The major problem is with being sure that the plugin is actually active as otherwise your code is just going to break the site.

You can check that a class or function exists before using it, but if your functionality depends on their existence, what are you going to do in case they are not there?

The proper wordpress way of having a dependency relationship with another plugin is by hooking on actions and filters they supply, not by directly trying to access the code. Actually even if that code is available there is no promise that it will still be there in the next release of the plugin, while actions and filters are supposed to be stable.

This depends on the plugin to expose enough hooks and APIs to be useful for you, but if it doesn’t you should not attempt to hack it by calling things directly, unless you understand that you are basically taking full responsibility for testing both plugins on every change you make