I can't guarentee this will work because I don't have all of the data (aka the order amounts from the second table).. but I think something like this will work. let me know if its goofing up.
SELECT
Year,
IF(Year = 'Grand Total', ' ', Month),
IF(Month = 'Year Total' OR Year = 'Grand Total', ' ', Ordered_ID),
AmntDue,
NumberOfBooksPurch
FROM(
SELECT
COALESCE(Year, 'Grand Total') AS Year,
CASE
WHEN Year IS NULL THEN ' '
ELSE COALESCE(MONTH, 'Year Total')
END AS Month,
Ordered_ID,
AmntDue,
NumberOfBooksPurch
FROM (
SELECT
YEAR(order_date) AS Year,
MONTH(order_date) AS Month,
CASE
WHEN MONTH(order_date) IS NULL THEN ' '
ELSE COALESCE(order_id, 'Month Total')
END as Ordered_ID,
SUM(quantity * order_price) AS AmntDue,
COUNT(order_id) AS NumberOfBooksPurch
FROM a_bkorders.order_headers
JOIN a_bkorders.order_details USING (order_id)
GROUP BY Year, Month, order_id WITH ROLLUP
) temp_table_alias
) final_temp_table;