There is a lot of work to pull this off. The first thing to consider is mounting the engine. The motor mounts on a 12A are on the front iron, while on a 13B they are on the center iron.
Here is a search for "13B swap": http://www.rx7club.com/search.php?searchid=6192536
Buying a used jspec motor is also a risk. Make sure you have a warranty of some kind, since you will have a good chance of receiving a blown motor. When you get it, there are a number of things to watch out for:
1. Compression: You want 100+ PSI front & rear
2. Spark plugs: if the electrodes are rusted, there was water inside the combustion chamber
3. Interally: check for coolant, rust, excessive oil inside (through exhaust ports)
4. Turbo: check for shaft play, chipped fins or oil leaking past the seals