Open sqljoin.php and save it as sqlarithmetic.php. Put this query in instead of the current one:
SELECT family, personal, dateTime, room, adults+children AS total FROM appointment JOIN employees ON employees.ref=appointment.ref;
The extra bit is the second line. This gets the data from two new fields and adds it together under the name of total. For this to work use PHPMyAdmin to add those two fields to the appointment table (Structure tab and look for Add lower down). Then in Browse add some data to those fields.
Back in your code add a variable to hold the data from total and then display it with the other data in your echo. Once you have done that you should see this or something like it:
You can subtract, multiply or divide in the same way.