We have 5 balls, lets name each one:
[tex]\text{Balls}=\mleft\lbrace A,B,C,D,E\mright\rbrace[/tex]Now, we want to take 2 balls at a time, wich means the the order that i take the ball doesnt matter, so lets see the possibilities:
[tex]\mleft\lbrace A,B\mright\rbrace,\mleft\lbrace A,C\mright\rbrace,\mleft\lbrace A,D\mright\rbrace,\mleft\lbrace A,E\mright\rbrace,\mleft\lbrace B,C\mright\rbrace,\mleft\lbrace B,D\mright\rbrace,\mleft\lbrace B,E\mright\rbrace,\mleft\lbrace C,D\mright\rbrace,\mleft\lbrace C,E\mright\rbrace\text{ or }\lbrace D,E\rbrace\text{ }[/tex]So, we have 10 ways to take 2 balls from 5 balls.
If want to solve the formula, we just need to remember the formula for the combinations of 5 elements taking 2:
[tex]\text{Combinatories n taking k }=\frac{n!}{k!(n-k)!}\rightarrow\text{Combinatories 5 taking 2 }=\frac{5!}{2!(3)!}=\frac{20}{2}=10[/tex]