Stealth planes can't be seen (very well) on radar. So one stealth plane should be unable to locate another stealth plane on its radar and vice versa.
So how would one stealth plane locate another, friendly, stealth plane?
The accounts that have been published of F-117 missions indicate that they generally flew single-ship, rather than formation missions, and it seems probable that B-2 aircraft do likewise. So in a sense, the important question for those aircraft isn't "how do I know where (another stealth aircraft operating nearby) IS," but "how do I ensure that we don't collide with each other," and that's a much easier question.
There are several ways to "deconflict" multiple aircraft operating in relatively close proximity that don't involve seeing or painting each other on radar. One aircraft operates at one altitude, another operates at a different altitude is one method, while timing over a point (you get to waypoint ABC no later than 19:00:00, and I'll be there no sooner than 19:00:30) is another, and physical separation (you stay west of this longitude line, I stay east) is another. In practice, all of these can be combined to ensure that "your" mission is deconflicted from "my" mission.
Of note, it isn't only stealth aircraft that will use tactics like this. Helicopters operating blacked out at night don't have air-to-air radar, and even with NVG's, the ability to see each other isn't reliable enough to plan on "see and avoid" and the "big sky theory" to preclude a mid-air, so they'll use some fairly detailed deconfliction plans incorporating separation in space and time.
More recent stealth aircraft such as the F-22 and F-35 are reported to have datalink capabilities so that they can "see" each other without radar, by means of an encrypted, stealthy broadcast of each aircraft's position and track. This would allow multiple aircraft to fly in formation (not close formation, but perhaps 1000' or more apart), and to work with other aircraft equipped with the same datalink, so even though the bad guys would only be able to see the non-stealth aircraft on radar, the friendlies could all see each other.
To not be detected, it is essential to suppress any radiation coming from the stealth airplane. Therefore, radar is not an option and only passive sensing is possible. When stealth aircraft fly in formation, they keep visual contact and avoid IMC flight.
To enable ship-to-ship communication, the F-117 has an optical datalink which uses red laser light to transmit the pilot's voice to another F-117 flying nearby.
There is no optical datalink over laser for F-117 pilot communications. Comms on that plane was my primary job and I can assure the readers it had no such thing.
The comment about single ships was about right - we had pre-programmed routes and due to autopilot and autothrottle the goal was to keep the airplane on route on time. The comms antenna were extendable, but during combat ops in foreign territory there were retracted and completely shut off all comms.
The idea of skin mounted antennas started to come around but it had not been implemented by the time I left late in 1996. For the OCIP III ring laser INS with GPS sync it was implemented on the backbone of the plane.
The simple answer is that the primary communication is visual when communicating plane to plane. That is established and is part of the ops protocol. To be clear however, normally stealth missions are not flown in a conventional formation.
Aircraft such as the B-2 employ from sat transceivers, datalink and even VLF. Transmit capability is in place for most bands, except to my knowledge not for VLF.
It is not well known whether stealth aircraft have been operationally deployed with metastatic radar, but such radar constellations have been developed for battlefield use. They are effective against low observable targets. A passive metastatic receiver could be deployed on an aircraft such as the B-2.
What is known is that a variety of optical com methods have been employed to permit plane to plane direct communications, at distances of less than 20nm. At first these relied on incoherent sources, but several systems have been tested using coherent sources and tested for data and voice. One such system was employed operationally configured to handle voice. There has been no recent open literature that I have seen recently which would indicate the deployment and operational reliance on those systems.
BTW, selection of the laser frequencies can be done to limit the intercept range of optical communication. For example, using a frequency absorbed by methane can create a good signal to noise at altitude, and the attenuation gets greater closer to the ground. The effect is two-fold as the emissions are absorbed at altitude (enroute) but the attenuation is much greater at lower altitudes where methane is more abundant.
There are open briefings which reference plane to plane optical (laser) com being used during the enroute phase of what are normally long aircraft missions.
Mission separation strategy is spatial and temporal, and that doctrine has not changed. Temporal separations of less then two minutes have been openly documented.
To summarize, assuming a given phase of a sortie is flown in a stealth mode, it is not possible to utilize "radar" in the sense that the stealth's aircraft radar transmits and receives it's own transmitted returns. To do so would reveal the aircraft's location. However, metastatic radar techniques could allow passive reception of other radar transmitters, and a situational rendering. In absence of that capability, the likely scenario is that datalink from other aircraft, such as AWACs, would provide battlefield awareness, and additional metadata to identify friendly aircraft. Even with metastatic radar, there is not ability to be completely autonomous.
When sorties are convergent, visual identification and separation techniques are used.
Finally coherent optical com are available on some aircraft for plane to plane communication.
One technique which is available to many military planes in radio (incl. radar) blackout is formation lights and markings.
Reference the thee images below of F-15 aircraft. Note that in the image made from slightly above the aircraft there is a clearly visible bright rectangle below the pilot and directly in front of the intake ramp. In the image made nearly level with the aircraft the rectangle is dull and only slightly apparent. In the image made from below the aircraft, this marking is almost indistinguishable from the area around it.
More modern systems can also make use of markings and cameras which reflect and detect exclusively outside the range of human vision, similar to the way a self driving car can track those around it. Formation lights can be used instead of markings and are especially useful when flight crews are equipped with night vision systems.
To my knowledge, formation markers are used more readily by non-stealth aircraft operating in clandestine capacities. Night penetration missions for special forces helicopters, for example, require that the aircraft fly very close together in a "blacked out" state. In fact, stealth planes like B-2's will be spaced out by flight planning and careful monitoring of autopilot and GPS and therefore never need to locate or avoid each other.
Although Formation markings and lights aren't likely to be frequently used by stealth aircraft pilots, the OP asked specifically how those pilots would locate each other (which is unlikely) rather than how they avoid the need to locate each other (which is more realistic.)