You can
put this solution on YOUR website!Look at my previous answers on types of questions like these.
Here is the first one to the equation stage. You can work it our from there...
Define 2 numbers to be x and y, so we know x+y = 18 --eqn1
Also

--eqn2
From 1, x=18-y. Sub this into eqn2 to give

. Expand this, simplify it and solve the quadratic equation to find y then find x from equation 1.
then try the second one yourself
Jon