Let the numbers of the coins be n, d and q.
n+d+q=169, 5n+10d+25q=1235 cents.
d=2q, so 5n+20q+25q=1235.
So 5n=1235-45q and n=247-9q, so 9q=247-n.
Also n+2q+q=169, n=169-3q or 3n=507-9q=507-(247-n).
Therefore, 3n=507-247+n, 2n=260 so n=130. (9q=247-130=117 so q=13 and d=26).
There are 130 nickels.