Let N be the number of nickels in the jar
Then 39 - N = the number of dimes
And we have that
N*(.05) + (39 - N) *.10 = 2.55 simplify
.05N + 3.9 - .10N = 2.55
-.05N + 3.9 = 2.55 subtract 3.9 from both sides
-.05N = -1.35 divide both sides by -.05
N = 27 = number of nickels