You think KKK members would purposely choose to go to a bakery owned by a group they hate and ask them to make a cake depicting that hate?
I think your scenarios is pretty ridiculous.
But still worth answering. Because that's what the people refusing to bake cakes or take photos for gay couples think it is like.
Better figure out just how far you are willing to coerce someone to do business in a hypothetical situation where no one is harmed, before you start doing it with real people, where harm can occur.
Once again though. a business that serves the public must serve the public.
The only exception i can think of here might have to do with being asked to create something that depicts something illegal. an illegal act or an illegal organization.
So it follows that you think a black business should be forced to serve KKK customers if the KKK customers demand it.
Which might include all sorts of legal activities: Catering for a white pride event, baking a cake with racist slogans, and printing and distributing event flyers.
That might better serve the public good, but have the honesty to acknowledge the costs of it.