You can 
put this solution on YOUR website! .
Write equations as you read the problem
    bat + ball = 31    (1)
    bat - ball = 15    (2)
Add the equations
    2*bat     = 31 + 15 = 46  ===>  bat = 46/2 = 23.
Then  from (1),  ball  = 31 - bat = 31 - 23 = 8.
Thus one bat costs $23;  one ball costs $8.
The rest is on you, since it is easy.
--------------
It can be solved in different ways, too;
but the way I showed in this post is the most educative (in my personal opinion).