I consider the geometric distribution with $ P(X=k)=p(1-p)^{k-1}$
I want to calculate: $ E[(X(X-1)] $
Solution is: $ E[(X(X-1)] = \sum_{k=1}^{\infty}k(k-1) \cdot P(X=k)$
How do I get to that. By definition holds: $$E[(X(X-1)] = \sum_{k=1}^{\infty}k(k-1) \cdot P(X=k(k-1))$$ How do I compute that?
Your "by definition"-statement is incorrect. By definition we have $$ \mathbb{E}[X(X-1)] = \sum_{k = 1}^{\infty} k \cdot \mathbb{P}(X(X - 1) = k). $$ Due to the law of the unconscious statistician (LOTUS) (this is formulated more generally for integrals, but if we choose our measure to be the counting measure, it becomes a sum) we have $$ \mathbb{E}(h(X)) = \sum_{n \in \mathbb{N}_0} h(x_n) \mathbb{P}(X = x_n) $$ for any function $h: \mathbb{R} \to \mathbb{R}$, where $(x_n)_{n \in \mathbb{N}_0}$ is the set of values the random variable $X$ takes. Here, $h(x) := x(x-1)$.