Yes, the idea is if you copy that chunk of code that addresses this for the one shipping charge for the original Book rule and make a new Book rule 2 with a different master_categories_id then it should work ...
Keep in mind you are using: $ship_books
then new Book 2 rule should have its own variable such as $ship_books2 (or some smart name) then be initialized below:
and then added to the total shipping cost for $total_shipping_costs:
Code:
// final shipping costs calculated above plus Undefined Products
$total_shipping_costs = $ship_postcards + $ship_books + $ship_prints + ($chk_undefined_products_cnt * MODULE_SHIPPING_CATEGORIESITEM_COST);