I have a computer on network A that I would like to backup via Time Machine to a drive connected to a computer on network B. Can this be done? Would I need a VPN? I just need the network B computer's drive to show up as Shared to the computer on network A.
No, this cannot be done as far as I am aware. It may be possible to hack together some way to fool it into working, but I would be willing to bet that it would eventually (and by 'eventually' I mean 'fairly soon' not 'some day before the sun goes out') fail.
Unless you have some specific reason to have to use Time Machine, I would recommend using CrashPlan instead of Time Machine. While there is a 'for pay' option with CrashPlan, you can use it completely free to back up to another computer anywhere. It doesn't matter if it's on the same network or across the Internet. You can set a very high encryption rate and customize the amount of CPU that the program uses. You also get much more control over the frequency of backups and how long information is retained. All in all it is a much better option than Time Machine or Time Capsule, in my opinion.
(I have no connection to the company except as a paying customer who is very satisfied with their service. I backup all of my laptops across the LAN to one 'retired' MacBook which has a very large external drive attached.)