I'll assume you mean the hypotenuse c=2 and vertex B=45 degrees.
That's the isosceles right triangle, sides in ratio [tex] 1 : 1 : \sqrt 2[/tex]
So we get
[tex]\dfrac{a}{1} = \dfrac{b}{1} = \dfrac{c}{\sqrt{2}} = \dfrac{2}{\sqrt{2}}= \sqrt{2}[/tex]
Answer: a=b=√2