No, it won't affect your biofilter. However, it is a strong medicine, and you need to be very careful using it on sensitive fish. Also, it's very dangerous to invertebrates like shrimp or crabs. If it's in your 55g, remove the crab as soon as possible. If it's in your 20g, I'd be worried about your ram, as they don't tolerate medicines well at all.