In your original post, the picture showed 2 pipes--the larger black drain with the valve and a smaller (should be the gray drain) pipe but I can't see where it goes. Does it tie into the larger pipe in front of the valve? If so, and you have traced the smaller pipe back to the tank it originates from and there is no valve in this smaller line--then, indeed, you have one valve to dump both tanks. This will work, but will require some thought/care to watch the tank levels--you must (should) keep the black tank with some volume in it to keep the solids from piling up--if the gray drain dumps into the same line as the black tank (infront of the valve) then both tanks will fill together.
NORMALLY, the gray tank will fill faster than the black, due to showers/dishwashing/handwashing/etc. and can be left open to the septic hookup, because it has (again, normally) its own drain valve. In your case, the gray water will stop at the valve and add to the black tank volume.
So--here is what I would do to figure this all out: Empty completely both tanks--and clean the black best you can. If you have a tank flush device, good--if not, you will probably have to take a hose/nozzle into the trailer itself and with the toilet valve open, use the hose/nozzle to help remove solids--you may be lucky and not have any to clean out. Have the valve open during all this. Once you are at the point you believe you have both tanks clean and empty--no more water is draining out--then turn on faucets and shower ONE AT A TIME and monitor if you have clear water coming out. If you get clear water out the large pipe, then you don't have a valve in the gray tank line, or if you do somewhere, it is open. Let all the draining water come to a stop, then flush the toilet and see that you get clear water out of that. If all this works as I think it will, you DO have both tanks tied into the same drain line, with no valve on the gray tank.
So, simply, you will have to watch the level in the black tank to know when it is at the point that draining is needed. IF YOU LEAVE THE VALVE OPEN ALL THE TIME, YOU WILL HAVE NO VOLUME IN THE BLACK TANK TO PREVENT THE BUILDUP OF SOLIDS--you must keep the valve closed in normal use of the trailer.
As a failsafe suggestion--with only the one valve to control the black tank--consider what would happen if it fails to work when the black tank is full. You should install a 2nd identical valve upstream/downstream of the first valve--and leave the upstream valve open all the time, using the downstream one to control dumping. This way, if the downstream valve should ever fail to work, you have the upstream valve available to close while you repair the other one. Trust me, you don't want a failed valve with a full black tank...
Hope all this helps some rather than just confuse...
2016 Tiffin 40 QBH
2015 38RSSA, traded
2005 TK3 #1869, 10 yrs of memories,
2017 F450 KR--one more Ford is it
2009 F450 4x4-died; 2010 F450-retired