A spring has stiffness of 100Nmm, the initial compression of the spring is 15mm, and it is then compressed to 65mm.

1Nmm = 0.001Nm
100Nmm = 100 X 0.001 = 0.1Nm
Comp.1 = 15 mm = 0.015m
Comp.2 = 65 mm = 0.065m

a) i-Find potential energy at 15mm.
ii- Find potential energy at 65mm.
The force exerted by the spring is:
at 15mm,Force=0.1X15
Force=1.5N
at 65mm,Force=0.1X65
Force=6.5N
Potential Energy(E_p )=Fd/2
E_p=1.5NX0.015m/2
E_p=0.01125Nm or 11.25mJ (Ans.to part a-i)
E_p2=(F_2 d_2)/2
E_p2=6.5NX0.065m/2
E_p2=0.21125Nm or 211.25mJ (Ans.to part a-i)
b) Find the work done during compression.
The average force applied between 15mm and 65mm= (1.5N+6.5N)/2=4N

Work Done=Fd
W.D.=4NX(0.065-0.015)m
W.D.=4X0.05
W.D.=0.2Nm or 20mJ (Ans.)

You didn't show any math, nor ask a question.

Stiffness (k) or "spring constant" is expressed in units of N/m, not Nmm. Perhaps that was a typo error.

The work necessary to carry out the additional compression that you describe is
(1/2) k [(65)^2 - (15)^2]