Can I reorient my dérailleur so the top jockey doesn't hit the cassette?
On these Shadow derailleurs, there is a tab that must rest on the bottom lip of the derailleur hangar.  (I'll note at this point that you must use the correct hangar for your bike. "Almost" like it or "derailleur has the same angle" when an incorrect hangar is used doesn't cut it. Millimeter differences create big changes in the workings of these things.  Consider how a few rotations of a fine threaded Barrell adjuster can change a whole gear.  Or if the cable is not routed just right--like say misses a small little leverage tab, the derailleur won't be able to get onto certain gears.).  If the little tab isn't touching the lip of the hangar, shifting will be compromised.  In addition, I see your derailleur's cable is not properly seated into the derailleur's housing.  That will eventually cause excess friction and poor shifting.  While one doesnt necessarily need  ferrule at this point on the external  (the derailleurs cable seat/stop can act as one)—a sealed ferrule will prevent easy contamination of the inner cable at this vulnerable spot.  Full Suspension bikes utilize the aluminum ferrule to help prevent ghost shifting when the suspension moves. 



Note the things I'm talking about on these pics of my XT Shadow der.   My cassette is an 11-36. Up front I have a 2x crankset, 38-28, and I'm on the big ring.  You have to hold the derailleur just so on install so that tab gets seated in the proper spot. In this Dealer's Manual from Shimano these issues are discussed. 

Finally. When a rear derailleur and it's cable are installed correctly, manipulating the B-screw moves the upper jockey wheel closer to or away from the cassette. Clockwise rotation moves the screw in and the jockey wheel away from the cassette; anti-clockwise moves the jockey wheel closer to the cassette. See photo for location and a view of the proper distance the jockey wheel should ride from the cassette.