when creating the shipping rule, set the trigger to use "Number of items with a specific column value":
If the Total Number of items where 'Category' has a value of 'CategoryA' is '=' a value of '1'
Use a flat rate charge of 2.90
Create a separate rule for each other quantity.