AFAIK: Pythagoras never wrote about this Triangle Theorem. There's no proof that he ever even knew about it. But he had mandated to his Pythagorean school (students) that any discovery or invention they made would be attributed to him instead.
The earliest known mention of Pythagoras's name in connection with the theorem occurred five centuries after his death, in the writings of Cicero and Plutarch.
Interestingly: the Triangle Theorem was discovered, known and used by the ancient Indians and ancient Babylonians & Egyptians long before the ancient Greeks came to know about it. India's ancient temples are built using this theorem, India's mathematician Boudhyana (c. ~800 BCE) wrote about it in his Baudhayana Shulba (Shulva) Sutras around 800 BCE, the Egyptian pharoahs built the pyramids using this triangle theorem.
Baudhāyana, (fl. c. 800 BCE) was the author of the Baudhayana sūtras, which cover dharma, daily ritual, mathematics, etc. He belongs to the Yajurveda school, and is older than the other sūtra author Āpastambha. He was the author of the earliest Sulba Sūtra—appendices to the Vedas giving rules for the construction of altars—called the Baudhāyana Śulbasûtra. These are notable from the point of view of mathematics, for containing several important mathematical results, including giving a value of pi to some degree of precision, and stating a version of what is now known as the Pythagorean theorem. Source: http://en.wikipedia.org/wiki/Baudhayana
Baudhyana lived and wrote such incredible mathematical insights several centuries before Pythagoras.
Note that Baudhayana Shulba Sutra not only gives a statement of the Triangle Theorem, it also gives proof of it.
There is a difference between discovering Pythagorean triplets (ex 6:8:10) and proving the Pythagorean theorem (a2 + b2 = c2 ). Ancient Babylonians accomplished only the former, whereas ancient Indians accomplished both. Specifically, Baudhayana gives a geometrical proof of the triangle theorem for an isosceles right triangle.
The four major Shulba Sutras, which are mathematically the most significant, are those attributed to Baudhayana, Manava, Apastamba and Katyayana.
Refer to: Boyer, Carl B. (1991). A History of Mathematics (Second ed.), John Wiley & Sons. ISBN 0-471-54397-7. Boyer (1991), p. 207, says: "We find rules for the construction of right angles by means of triples of cords the lengths of which form Pythagorean triages, such as 3, 4, and 5, or 5, 12, and 13, or 8, 15, and 17, or 12, 35, and 37. However all of these triads are easily derived from the old Babylonian rule; hence, Mesopotamian influence in the Sulvasutras is not unlikely. Aspastamba knew that the square on the diagonal of a rectangle is equal to the sum of the squares on the two adjacent sides, but this form of the Pythagorean theorem also may have been derived from Mesopotamia. ... So conjectural are the origin and period of the Sulbasutras that we cannot tell whether or not the rules are related to early Egyptian surveying or to the later Greek problem of altar doubling. They are variously dated within an interval of almost a thousand years stretching from the eighth century B.C. to the second century of our era."