This is our solution.
Instead of writing out names for the 4 jewelers we used A B C and D.
After the 4 jewelers gave out and received jewels from each other the table should look like this.
In the problem, it says that A, B, C and D should all equal each other
A=5R, 1S, 1P, 1D
B=7S, 1R, 1P, 1D
C=97P, 1R, 1S, 1D
D=2D, 1R, 1S, 1P
An easy way to work this out is to use Algebra.
Because P is worth the least we will use C to compare to the others.
So the equation will be:
97P+R+S+D=5R+S+P+D
First, you cancel out the same letters on both sides. For this one, you can cancel out S, P, D, and R. After canceling, you should be left with 96P=4R. You can simiplfy this by dividing each side by 4 which will equal 24P=R. So if P is 1 dollar R is 24 dollars.
Compare C with B and D and you will work out that A B C and D all equal $233
This last table shows how much each gem is work
Ruby $24
Sapphire
Pearl $1
Diamond $96