You have the basic idea, but you’re missing some crucial pieces. If $C$ is not connected, you can’t guarantee that your $A$ and $B$ are open in $X$; you can only guarantee that they are relatively open in $C$. Thus, you want to show that if $A$ and $B$ are disjoint, relatively open subsets of $C$ such that $C=A\cup B$, then one of $A$ and $B$ must be empty.
Since $A$ and $B$ are relatively open in $C$, there must be open sets $U$ and $V$ in $X$ such that $A=U\cap C$ and $B=V\cap C$. But then without loss of generality $U=X$ and $V=\varnothing$, so $B=\varnothing$, as desired and $C$ is connected.
Note that it makes no difference whether $C=X$ or not.
In the case of compactness it makes no difference whether you use the topology of $X$ or the relative topology on the subset.
Proposition. Let $\langle X,\tau\rangle$ be any space, let $K\subseteq X$, and let $\tau_K$ be the relative topology on $K$; then $K$ is compact with respect to $\tau$ iff it is compact with respect to $\tau_K$.
Proof. Suppose first that $K$ is compact with respect to $\tau$, and let $\mathscr{U}\subseteq\tau'$ be a $\tau'$-open cover of $K$. For each $U\in\mathscr{U}$ there is a $V_U\in\tau$ such that $U=K\cap V_U$. Let $\mathscr{V}=\{V_U:U\in\mathscr{U}\}$; clearly $\mathscr{V}$ is a $\tau$-open cover of $K$, so it has a finite subcover $\{V_{U_1},\ldots,V_{U_n}\}$. Let $\mathscr{F}=\{U_1,\ldots,U_n\}$; $\mathscr{F}$ is a finite subset of $\mathscr{U}$, and
$$\bigcup\mathscr{F}=\bigcup_{k=1}^nU_k=\bigcup_{k=1}^n(K\cap V_{U_k})=K\cap\bigcup_{k=1}^nU_k=K\;,$$
so $\mathscr{F}$ covers $K$. Thus, $K$ is compact with respect to $\tau'$.
Now suppose that $K$ is compact with respect to $\tau'$, and let $\mathscr{U}\subseteq\tau$ be a $\tau$-open cover of $K$. For each $U\in\mathscr{U}$ let $V_U=K\cap U$, and let $\mathscr{V}=\{V_U:U\in\mathscr{U}\}$. $\mathscr{V}$ is a $\tau'$-open cover of $K$, so it has a finite subcover $\{V_{U_1},\ldots,V_{U_n}\}$. Let $\mathscr{F}=\{U_1,\ldots,U_n\}$; $\mathscr{F}$ is a finite subset of $\mathscr{U}$, and
$$\bigcup\mathscr{F}=\bigcup_{k=1}^nU_k\supseteq\bigcup_{k=1}^n(K\cap U_k)=\bigcup_{k=1}^nV_{U_k}=K\;,$$
so $\mathscr{F}$ covers $K$. Thus, $K$ is compact with respect to $\tau$. $\dashv$
Best Answer
You don't even need to consider $A\subseteq X$. What you must show is that any open cover of $X$ contains at least one finite subcover of $X$. But note that the only open cover of $X$ is the singleton $\{X\}$, and it trivially contains a finite subcover: $\{X\}$ itself.
Addition; pointed out by @RickyDemer: $\{\varnothing,X\}$ is another open cover of $X$, as $X\subseteq \varnothing\cup X=X$, but it is a finite cover as well.