First, of all, use the motherboard cpu support list to find your list of potential candidates.
There may be a bios update needed, so hopefully, you have two running systems to start with.
As to relative capabilities, use passmark benchmarks to get an idea.
For example, a Q9650 might be one candidate and here is the passmark link:
https://www.cpubenchmark.net/cpu.php?cpu=Intel+Core2+Quad+Q9650+@+3.00GHz&id=1050
If supported, a quad will always be better.
Then, go to ebay and find the processor in used condition. filter on completed auctions and you will see what the cpu actually sold for.
A Q9650, for example is in the $50 price range.
If only dual core processors are supported as in your second pc, start whith the highest clock and latest gen processor.
A Pentium D960 may be as good as you can do.
https://www.cpubenchmark.net/cpu.php?cpu=Intel+Pentium+D+960+@+3.60GHz&id=1131
I used the same process to upgrade a dual core to a dual with hyperthreading(=4 threads) with a nice performance boost.
And...
Your best performance upgrade will be to change out a HDD to a ssd.