Is it necessary to learn how to prove Mathematical theorems as a CS Student?
There are several different ways to answer your question.

First, in the particular course you are taking now, part of the material is mathematical proofs. In order to succeed in this course, you need to be able to prove mathematical theorems. There are several reasons for this requirement:


Some more advanced classes also involve proving theorems.
The concept of proof and mathematical validity is important even if you don't expect to actively prove theorems. You need to understand the difference between a heuristic algorithm and an algorithm which is guaranteed to always work efficiently.
Programming is an abstract pursue, and requires a certain way of thought. Mathematics is one way to develop this way of thought, since it forces you to think in abstract terms.


Second, while more advance proofs do involve a lot of problem solving, in this particular problem you are handed out the solution, and your task is to convert the hint into a formal proof (in the sense of your class). At this stage of your class, you are not required to be able to create completely new proofs. Rather, the emphasis is on you understanding what is a mathematical proof and how it is written. Later on you might be given more creative tasks.

Third, the course you're taking will also teach you basic mathematical concepts that might be useful for you in the future. For example, one of the topics you are taught is propositional logic. You could encounter propositional logic in database theory, verification, and elsewhere. The only way to understand such an abstract concept is to play with it, and the way we play with concepts in mathematics is by proving simple statements.

Fourth, you mention that proving theorems is hard for you at the moment. This is why you're taking this class. One goal of the course is to teach you how to prove theorems. You might find it hard, but if the course goes slowly enough, you will eventually find it easy, and will have gained an invaluable skill. In a similar vein, you might have encountered the jump in difficulty level from high school to undergraduate studies. It requires some adjustment, but eventually you will gain the relevant studying skills.