The thermal efficiency is defined as follows
[tex]\eta = 1 - \frac{Q_{\text{out}}}{Q_\text{in}}[/tex],
and the energy which is put into the system is
[tex]Q_{\text{in}} = W_\text{out} + Q_\text{out}[/tex].
In your case [tex]Q_\text{in} = 25 \text{ J},W_\text{out}=10 \text{ J}.[/tex]
So [tex]Q_\text{out}=10 \text{ J}[/tex] which gives an efficiency of
[tex]\eta = 1 - \frac{10 \text{ J}}{25 \text { J}} = 0.6 = 60 \%[/tex].