Hi milesz ,
did you read the diy on e38 .org
we can help with anything not clearly understood if you need more explanation .
are you replacing both cover gaskets , the battery cable on the X5 left cover is placed different to the e38 diy .
there is a service manual available from
www.bentley publishers.com , this is very useful along with the diy posts
Valve Cover Gasket Replacement Procedure (long) (No 56k!) this is the diy showing how to remove the clips for the wiring box on the M62 engine . this is on a 740i but very similar to X5 .
http://bmwtips.com/tipsntricks/valve...valvecover.htm this is from e39 tips .