This implies that you are running two BDE versions that are compatible. For example, they are both 5.x or later.
Delphi 5 shipped with BDE 5.x. This version of the BDE was heavily documented by Borland to NOT be backward compatible. In fact, migrating our source code from D3 to D5 would have been pretty simple, except for some changes we had to make for BDE 5.x compatibility.
Is the older one BDE 4.51 (aka 4.5.1.4) or older?
The version is in the properties of the idapi32.dll.
If there is a solution for this, it probably involves renaming one of the idapi32.dll files. Because once one version is loaded, all other applications attempting to use it will use the one loaded in memory first. It's the classic caveat of using DLLs.