You can set these shipping charge rules directly in the cart object. There is no need for any variables, you can write the rules like how you have them here.
For the first example you would craft the rule like this:
Presence of an item in the cart, if item 1 exists in the cart
AND quantity of a specific item in the cart, if the quantity of item 1 in the cart is <= 3
OR Presence of an item in the cart, if item 3 exists in the cart
AND quantity of a specific item in the cart, if the quantity of item 3 in the cart is <= 3
The charge would be a flat rate of 6.50. I'm including a screen shot of this so you have a visual reference as well. You should be able to craft the other charge rules in a similar fashion.