The point is that 45+ 45= 90 so if one angle of a right triangle is 45 degrees, so is the other- and that means you have an equilateral right triangle.
Now, assume the two legs both have length 1. Then, by the Pythagorean theorem, the length of the hypotenuse, c, is given by [itex]c^2= 1^2+ 1^2= 1+ 1= 3[/itex] so [itex]c= \sqrt{2}[/itex].
You can get sin(45) and cos(45) from that.
By the way, because this will probably come up soon:
An equilateral triangle also has all three angles equal: 180/3= 60 degrees.
If you drop a perpendicular from one vertex of an equilateral triangle to the opposite side, it also divideds the opposite side into equal parts and divides the angle into two equal angles.
That is, you have two right triangles with angles 60 degrees and 60/2= 30 degrees.
If you take one of the two short legs to have length 1, the hypotenuse has length 2. You can use the Pythagorean theorem to find the length of the other leg, the perpendicular and find sin(60), cos(60), sin(30), cos(30) from that.