Prove that the family of open sets in $\mathbb{R}$ has cardinality equal to $2^{\aleph_0}$
It is often useful to replace $2^{\aleph_0}$ with another set of the same cardinality for the purpose of finding injective functions; I'll do so frequently, and I recommend you learn to think about sets in this way.
For one direction, finding an injective function $\mathbb R\to\mathcal T$ should be easy. I leave it to you. (Why does $|\mathbb R|=|2^{\aleph_0}|$?)
The other direction is harder. Your observation is not quite right: I don't see how you're associating $x$ to $r_x$, since $x$ could be irrational. I think the fact you're referring to -- a version of it, at least -- is the following.
Let $A\subseteq\mathbb R$ be open. For each rational number $q\in A$ there exists a rational radius $r_q\in\mathbb Q$ such that $(q-r_q,q+r_q)\subseteq A$. Then $A=\bigcup_{q\in A}(q-r_q,q+r_q)$.
Since $A$ is completely characterized by the set $\{(q,r_q)\,:\,q\in A\cap\mathbb Q\}$ (here I mean $(q,r_q)$ as an ordered pair, not an interval!), why don't we make a function $\mathcal T\to 2^{\mathbb Q\times\mathbb Q}$ given by $A\mapsto \{(q,r_q)\,:\,q\in A\cap\mathbb Q\}$. The map is injective (why?) and $|2^{\mathbb Q\times\mathbb Q}|=|2^{\aleph_0}|$ (why?). So we're done!
Edit: The statement I gave is not correct as written, as user48481 Mirko Swirko pointed out. The problem is that if I pick the $r_q$ to be too small then I might not get all the points in the open set. For instance, if $A=(0,2)$ and I choose $r_q$ so that $\sqrt2\notin(q-r_q,q+r_q)$ for any $q$, which is possible because $\sqrt2$ is irrational, then the union of the $(q-r_q,q+r_q)$ will miss the point $\sqrt2$.
A corrected version of the statement goes like this.
Let $A\subseteq\mathbb R$ be open. There exists an assignment $q\mapsto r_q$ of rational numbers to rational radii (so $q,r_q\in\mathbb Q$) such that $A=\bigcup_{q\in A} (q-r_q,q+r_q)$.
To prove the statement, it suffices to consider the case where $A$ is an interval $(a,b)$, since every open subset of $\mathbb R$ is a countable union of such intervals, as you observed. You can do this by letting $(q_n)_{n=1}^\infty$ being an enumeration of the rationals in $(a,b)$ and choosing $r_{q_n}$ so that, e.g., if $q_n$ is closer to $a$ than $b$ then $q_n-r_{q_n}-a<2^{-n}$.