I have struggles with solving the following question:
Let $X$ be a curve in $\mathbb{P}^2$ of degree $d$. Show that the set of hyperplanes $H \in (\mathbb{P}^2)^{*}$ such that $X \cap H$ consists of exactly $d$ distinct points, is a non-empty subset of $(\mathbb{P}^2)^{*}$.
Also; show that the above is still true if $\mathbb{P}^2$ is replaced by $\mathbb{P}^n$ for $n > 2$.
For the first part, I was thinking of using Bézout theorem and the fact that there is a line intersecting the curve $X$ in exactly $d$ points, but I'm stuck here.
The $\Bbb P^2$ case can be handled using Hartshorne exercise I.7.4 which says that there's a line intersecting our given curve in exactly $d$ points, as you mention in your post. Here's the hint from the exercise which describes how to solve it:
The reason this works is that by (generalized) Bezout, the sum of the intersection multiplicities has to be $d$, and so if we can guarantee the intersection multiplicty at each point is 1 (by excluding singular points and non-transverse intersections), then we'll win.
The procedure from exercise I.7.4 generalizes to the case of $n>2$ as follows: it's still true that the collection of all hyperplanes through any singular points of the curve is a proper closed subset of the dual projective space. For the other part of the proof, instead of saying all the tangent lines are contained in a proper closed subset of the dual projective space, we want to say that all the hyperplanes which intersect our curve non-transversely are contained in a proper closed subset of the dual projective space. Non-transverse intersection at a point is a closed condition on hyperplanes through that point, and the same logic as one uses in exercise I.7.3 will apply here to show that the hyperplanes with non-transverse intersection are contained in a proper closed subset of the dual projective space.
(This describes the general strategy, but I was a little glib with some of the details - if you would like to see them more fully set out, just leave a comment with specifics and I'll update the post.)