I would appreciate a bit more of code, but i'll try and answer what i think your problem is

In your interface file, you have declared a variable to hold an XYPoint reference, like this:
[b]Rectangle.h[/b]
{
XYPoint *origin;
}
This means, that you have created a variable named "origin" and that it will hold a reference, or pointer to an XYPoint object in memory.
So far so good. Now, notice that you haven't done the alloc and init method on this object, meaning that right now it's just an empty variable. You need to have it point to an object in memory, thus you need to create an object. This is why you pass in an object as an argument, like this:
-(void) setOrigin: (XYPoint *) pt;
This makes you create and allocate and initialize an XYPoint object in your main routine. By passing that same object in as an argument, you make your origin variable point / reference the same object in memory. Thus, right now both the object of an XYPoint class you declared in main, and the origin variable holds a reference to the same object.
Now you can then do operations on it, as you actually have an allocated and initialized object, in an instance of another class. You can set the x and y of the origin object, just as if it was in your main routine (although you need to create methods to do so).
If you are unclear about the whole objects reference and pointing thing, let me know and we will take it from there

Hope i helped!
Best regards
/JBJ
www.jbjprogramming.com