This question has been answered differently by me than the book although I have the feeling that my solution is good as well, I am not a professor so I can't be sure. The picture is my solution and the one on the left is the book's solution (with the question given above it). Can anyone tell me why my answer would be wrong?
PS: the n(n+1)/2 identity has been proven (by induction) in a previous exercise in the book which is why I wrote it down there at the end.
Thanks for reading