If the pentagons are similar, the ratio between a pair of sides of one pentagon is the same ratio for the similar pair of sides of the second pentagon, so we have that:
"Since the ratio is 5:7 you can think in total there was 12 equal blocks of money invested. 5 of those blocks belonged to Jim and 7 of those blocks belonged to Gail. Since they invested $3,600 and then made $6,450 in total there is $10,050. Divide that total into 12 equal blocks of $837.50 and 5 of those blocks belong to Jim. So he will get $4,187.50"