Create a local tivial Repository. Place both A.deb and B.deb inside it.
* Create a folder Repo.
* Copy all .deb files inside it.
* Now create
Packages index file.
$ dpkg-scanpackages Repo > Repo/Packages
$ gzip -c Repo/Package > Repo/Packages.gz
If this shows missing InRelease file or Release.gpg file use apt-get.
Now apt will search for missing dependencies in your Personal Repo also.
And if A.deb depends on B.deb it will install it.
If you want to create a package to download and install various packages from different locations. May be you can use Debian preinst, postinst, prerm, and postrm scripts.
7.6 What is a Debian preinst, postinst, prerm, and postrm script?
These files are executable scripts which are automatically run before or after a package is installed or removed. Along with a file named control, all of these files are part of the "control" section of a Debian archive file.