if you don't have any code, then that's good. That means you can work out how to do it on paper first. Once you know how to do it yourself, THEN you can write the code.
Having said that, your question doesn't make much sense. Do you mean you have x and y coordinates of each object? Are you trying to find some angle (and measured against what exactly) between them?
This sounds like basic algebra or trig type stuff. Nothing terribly complicated.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors