[FMX] Please help with custom collision-detection engine

I posted this here:

http://www.kirupaforum.com/forums/showthread.php?t=63830

but I think that this might have been a better place to put it. I’m really stuck with this one. Thanks in advance.