Prueba esto:
En una sola línea:
SELECT SUM(Class.Students * Books.Cost) AS BookCost FROM Books INNER JOIN Class ON Books.ClassId = Class.ClassId WHERE Books.ClassId = <CLASS-ID-VALUE> GROUP BY Books.ClassId
Con formato:
SELECT SUM(Class.Students * Books.Cost) AS BookCost
FROM Books INNER JOIN Class
ON Books.ClassId = Class.ClassId
WHERE Books.ClassId = <CLASS-ID-VALUE>
GROUP BY Books.ClassId