Given data:
The given average of three numbers is x=25.
The first number is a=18.
The second number is b=40.
The expression for the avearge of three numbers is,
[tex]\frac{a+b+c}{3}=x[/tex]Substitute the given values in the above expression.
[tex]\begin{gathered} \frac{18+40+c}{3}=25 \\ 58+c=75 \\ c=17 \end{gathered}[/tex]Thus, the third number is 17.