Who was the first buddha? If the number of buddhas is increasing, who was the first, and how did he become buddha without the dharma or a guru?
You asked a very intelligent question; but this is an intellectual quest that fallen into the category of the Ten Unexpounded Questions, I infer. It belongs to this group: Is the world eternal?. Discerning that question, it is asking Does the world have beginning/When does the world first appear; follow suit, Who was the first Buddha?

Since the Buddha withdrawn from giving answer to the Ten, usually that's the end of it. And then the classical way is to stress, Buddha's teaching is for ending suffering... for someone like wounded by an arrow at heart dying immediately... etc. etc. full-stop. Done. 



But I think maybe you are interested to investigate a bit more... 

The intellectual questions are confined by intellectual limitation. Intellectual limitation of procuring question or answer is limited in these four types:


This is (P)
This is not (-P)
This is also is not (P also -P)1
Neither this is nor is not (Neither P nor -P)2


Called Catuṣkoṭi, I prefer the name "Four-statements". Not a fifth statement can be procured by the intellect, except combining the four to make sub-sets.  

A question asked from these Four-statements answered in the Four-statements, Buddha called it "game of the mind" (戲論). There are plenty of these examples in general teachings recorded in Agama Sutras; sophisticated examples in advance teachings recorded in such as Avatamsaka Sutra (the first Sutra spoken by the Buddha). For instant, if this same type of question asked by a Christian: Who created the world? Ans: God. Who created God? Ans (maybe:)): God's father. Who created God's father? Ans: God's grandfather... finally, one can only come up this answer to halt the question: God is Alpha and Omega (the beginning and end/no beginning and end). See? How horrible the mind can elicit gaming!

But, The Truth is beyond these Four-statements; beyond intellect, beyond the mind; can be pointed, yet not caged for display, like the finger pointing to the moon. That's the deepest teaching of the Buddha. Nagarjuna elaborated the teaching profoundly, for easy application, used one word: Emptiness (空).

OK. I'm diving a bit too much into the sea, giving too long an answer, a bit scary too, huh? Better is finding out by yourself :)



Now let's go headlong into your title question: 


  Who was the first buddha?


The short answer is: 。 (silence)

Additional: The number of buddhas isn't increasing nor decreasing... etc., for this analogy is an extended fabrication constructed by the Four-statements.



Now let's deal with the next: 


  how did he become buddha without the dharma or a guru?


I think the he you referred to Buddha Shakyamuni. First, the Dharma is constant and present, not created hence can't be destroyed; the word used to refer is suchness, or thusness. By the moment Prince Siddhartha realized full enlightenment, he embodied the Dharma, by embodied the Dharma he realized full enlightenment, called Buddha Shakyamuni. 

Guru I think you meant teacher. Buddha's teachers are previous Buddhas, one of the most significant Gurus for our Buddha, would be Buddha Dipamkara. To be the Lord Buddha of the Three-thousand-world (三千大千世界)3, one has to receive the Mark (授記) from the previous Buddha. In Buddha Shakyamuni's case, the Mark was endorsed by Buddha Dipamkara4. When a Buddha is perfectly enlightened, worth to be the teacher of all humans and devas, opens the deathless gate for all, he is called a Samyaksambuddha, one who attained the pinnacle of enlightenment, Anuttarā-samyak-saṃbodhi. My other post may provide more info.  

There is another type of Buddha, he doesn't have a Guru [to endorse him the Mark], called Pratyekabuddha, or called self-awaken Buddha (獨覺佛). He realizes full enlightenment by discovering the Dharma by himself, contemplating the 12 Nidanas, during time there's no Buddha appearing. He doesn't teach nor forming Saṃgha to carry on any teaching. 



Indeed your question is well formulated, involving understanding many Buddhist doctrines. My answer just serves as indications, it's for you to explore the richness of the Buddha Dharma, how Buddha sees cosmology, life, the world... etc. _/|\ _ (all-my-ten)        



Footnotes:

1. From Chinese wording I think it made more sense to use also then and. Obviously putting and is violating logic.

2. It follows that the 4th statement should be treated same way.

3. Three-thousand-world has different definitions, I'm still not clear about the grouping of solar systems and galaxies how they referred to in Buddhist cosmology. My assertion is, either one galaxy one world, or one thousand galaxies one world. If it's the later, then 1,000 Milkyway-like star-clusters will be one Samyaksambuddha's teaching ground ~ huge classroom! Sources related to one 3TW presiding one Lord Buddha: Agama Sutras, Avatamsaka Sutra, Mahāprajnāpāramitāśāstra, Abhidharma-kośa, etc.

4. Sources: in the Sutras collected in one of the 12 Sutra-sections of the Chinese Canon, the Agama Section (which is equivalent to Pali Canon's Nikaya Pitaka); Diamond Sutra, Dharmagupta Vinaya (survived only in the Chinese Canon), Mahāprajnāpāramitāśāstra, etc.