First, be sure that both tanks are empty to start with. Otherwise this method could give you a nasty surprise.
Then the way to tell which tank your sink or shower is connected to is to close both tanks and run water from the sink. Run a gallon or so into the tank. Then open one holding tank at a time. Whichever one the water comes out of is the tank the sink is connected to.