It's a relatively new phenomena that the patient drinks the medicine. Traditionally, before Westerners, the curandero would drink alone in the presence of the patient. And earlier still the curandero drank a medicine derived solely from ayahuasca vine (banisteriopsis caapi). That is, the medicine did not contain chacruna (psychotria viririds) as it does today in order to bring about visions. It was not needed for visions and to heal.
Chacruna was added in the 1900s due to the impact of westernization in the region and the negative affect on the curanderos' natural connections.
So it isn't necessarily that a formula of two plants was magically discovered at the very beginning.
EDIT: add to this that when you cut the vine, a rich colored liquid / sap forms on the cut part. It tastes quite sweet. It's not a stretch to imagine the first person simply cut a vine, tasted it and decided to do an extraction in hot water.