That depends. Your pretty much implying that your going to take the good parts off both engines, and make one functional engine? Well, I would just rebuild my engine with the 400 (although I might raise my budget). Reason being, I would have no idea what might be wrong with the other engine. I know you said it has a bad lifter, but what else dont you know about that engine. Lets assume that you "frankenstien" both engines. Well, your pretty much going to break them both down. And still have to spend the 200-300 for gaskets, belts, water pump, new plugs, wires, all that good stuff. So you back at square one, the money issue.
The only advantage of having both cars is that once your done you can try to make back some money by parting out everything you have double of. Then haul the shell to a salvage yard, which all they really are going to want is the glass/engine. Either way you do it, its going to be a good learning experience. And your going to be looking at some downtime. While your waiting, id start stripping and labeling. However you look at it, that engine is going to come out. Might as well take out yours, and check the cylinder head warpage and engine block warpage. You might find that you can get away with using it as is, or getting a little work done on it. This
(click me) is really the first thing you should invest in before tearing down that engine. I have one, and its by far the best investment I could of ever made for my celica.
Sorry for rambling on.....