Hello,
Each element as an own identifier, this allows to reference them in other elements
When you import a project B into a project A obviously there are collusions of B identifiers already present in A, so the imported elements identifiers are modified.
When it is a "import from library" rather than a "simple import", the original identifiers are not lost to allow later updates, if you look into the importing project files you have the couples "oid <id>" attached to the imported elements and corresponding to the initial identifiers in A. So it must be possible to do the reverse process, even this is not simple !
The first steps must be to have the project B with wrong identifiers :
- load A
- do a save-as into B
- if needed move the package B whose was created by the import to place it at first level
- remove all except the package B whose was created by the import
- save (project B) then go out
- delete all useless files coming from A into project B directory (warning doing that)
Now you have to replace the identifiers without forbidden to modify the references to them and to rename the files as well (
http://www.bouml.fr/doc/index_projectfiles.html), of course the oid couples have to disappear
After that :
- load B
- move all direct sub elements of package B (created by the import) into project level
- remove package B (created by the import)
- save
Warning, some identifiers can be shared by different kinds of elements, else it is too simple

Some parts in B like the generation settings are anyway lost, you will have them as they are in A
P.S. if you just remove the "oid <id>" couples rather than to do the substitutions / file renaming you will have a "brother" of original project B but not a "clone" of it, you will not be able to update A after modifying the recreated project B