Answer
$18,13$ and $9$
Work Step by Step
Let the numbers be $x,y,z$
Sum of three numbers is $40$
$x+y+z=40$ Equation $(1)$
First Number is $5$ more than a second number
$x=5+y$ Equation $(2)$
First Number is twice the third number.
$x=2z$ Equation $(3)$
From Equation $(2)$ and Equation $(3)$
$5+y = 2z$
$y-2z = -5$ Equation $(4)$
Substituting $x=5+y$ in Equation $(1)$ we get,
$x+y+z=40$
$5+y+y+z=40$
$2y+z=35$ Equation $(5)$
Multiplying Equation $(5)$ by $2$ and add with Equation $(4)$
$2(2y+z)+y-2z=2(35)-5$
$4y+2z+y-2z=70-5$
$5y=65$
$y=13$
Substituting $y$ value in Equation $(2)$ we get,
$x=5+y$
$x=5+13$
$x=18$
Substituting $x$ and $y$ values in Equation $(1)$ we get,
$x+y+z=40$
$18+13+z=40$
$31+z=40$
$z=9$
Numbers are $18,13$ and $9$