I assume that you need this info for your use and do not need it in apex.
if that is true then are two MORE easy ways to get it.
A)Use eclipse (or any IDE)and find in files.
Here are steps:
1) Down load all your metadata on local machine with eclipse https://developer.salesforce.com/docs/atlas.en-us.eclipse.meta/eclipse/ide_getting_started.htm
2) Then go to search -> find in files
3) enter the object name for which you want to search all relationships and add filter to search only objects files.
4) This will give you result all objects that have
B)Use Schema builder.
1) Select auto layout
2) Select the objects in question
2) follow the line to understand the relationships