Difficulties proving when a language is in P or is NP-complete I have some difficulties in understanding how to prove when a language is in P or is NP-Complete. Specifically, consider the following decision problems w.r.t undirected graphs $G = (V, E)$:

$L_1 = \{ \langle G = (V, E), k\rangle \mid \text{$G$ consists of connected} \\ \text{components of size at most $\log|V|$ each, and has a vertex cover of size $k$}\}$

$L_2 = \{\langle G = (V, E), k \rangle \mid \text{$G$ consists of two connected} \\ \text{ components  of size  $\frac{|V|}{2}$ each, and has a vertex cover of size $k$} \}$


I think that $L_1$ is in $\text{P}$, and $L_2$ is in $\text{NP-complete}$. Am I right? How can I prove that?
The language $L_1$ is in P since you can brute force an optimal vertex cover in each connected component.
The language $L_2$ is NP-hard by reduction from vertex cover. Roughly, given an arbitrary graph, we have to make it connected and to add another connected component, controlling the change of the minimum vertex cover throughout the process.