this is by no mean feat a simple task to accomplish...
if you want understand how hard this is, try and subract or union a complex object with 3DStudio Max5 - they just don't do it right, especially on subtraction.
the way to go about it though is thinking about it in the simplist of terms - in other words, of you want to unite objects - you take all the point of Object B (combiner object) and then you cross check what vertex are withing the structure of Object A (target object) ... you then find which ones are the closest inside and closest outside the object... Save these for points of referance!
delete the rest which are internal (i'd suggest a boolean mark to tell the engine which to cull and which not to).
Next you do and interpolation movement between each of the Vertex which are marked for just inside and just outside ... you check for the 2 closest to each other only and then move the one inside to the intepolled point which collides with the surface approximation you've taken from the object your putting it in.
finally you strip ALL of the faces from the object and rebuild them from all of the vertex available

this may screw up the UV mapping, but it boolean operates correctly even on the most complex objects. Remember the face you use for calculating the interpol point is the nearest one on Object A

which will involve 3 Vertex meaning you'll have to cross Product the offset points to get the position.
i currently have a DLL for achieving this kinda things, but its not setup for DarkBasic Mesh use yet - and with the FVF format it makes it ALOT harder to do these kinda things, because you don't strip faces you have to reorder the entire bloody vertex data to create the faces in the right order. its insane really.
Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?