Interaction-spotting approach: Theophylline is a narrow-margin drug cleared by liver CYP enzymes, so the dangerous antibiotic is the enzyme inhibitor.
Scan the options: amoxicillin (penicillin), cefotaxime (cephalosporin), and cotrimoxazole are not meaningful CYP inhibitors of theophylline clearance, so they are safe.
Erythromycin, a macrolide, inhibits hepatic CYP and reduces theophylline metabolism. Plasma theophylline rises, risking nausea, tachyarrhythmias and convulsions. Hence erythromycin should be avoided, or theophylline cut to two-thirds with level monitoring.
Memory aid for CYP inhibitors that raise theophylline: erythromycin, ciprofloxacin, cimetidine, allopurinol, oral contraceptives.
Ref: K. D. Tripathi, 7th Edition, drug interactions of methylxanthines.