How to prove that sets $A=[2,30]\cup\{0,1\}$ and $B=(-2019,+\infty)$ have same cardinality? I use the property: composition of bijections is also a bijection.
Let $f:[2,30]\cup\{0,1\}\rightarrow [0,1],$
$g:[0,1]\rightarrow (0,1),$
$h:(0,1)\rightarrow \bigg(-\dfrac{\pi}{2},\dfrac{\pi}{2}\bigg),$
$r: \bigg(-\dfrac{\pi}{2},\dfrac{\pi}{2}\bigg)\rightarrow R,$
$s:R\rightarrow (-2019,+\infty).$
Then we have composition $d=s\circ r\circ h\circ g\circ f:[2,30]\cup\{0,1\}\rightarrow (-2019,+\infty).$
I don't know how to define $f$ and I'm not sure for $s.$ For $s$ I would take $s(x)=e^x-2019.$ How could f be defined?
Also, what if $A=(1,30],$ what should I take for $f?$
 A: How about:
$$k:[2,30] \to [0,1]$$
defined by
$$k(x) = \dfrac{x-2}{28}$$
Then you have:
$$f(x) = \begin{cases}x, & x \in \{0,1\} \\ g\circ k(x), & \text{otherwise}\end{cases}$$
If you just want two injective functions, then how about:
$$p:[2,30]\cup \{0,1\} \to (-2019,\infty) \\ p(x) = x$$
and
$$q:(-2019,\infty) \to [2,30]\cup \{0,1\} \\ q(x) = 2+\dfrac{x+2019}{x+2020}$$
both of these functions are strictly increasing, so they are definitely injections. $p$ is obvious, while $q$ maps to $(2,3) \subset [2,30]\cup \{0,1\}$. Now, you can apply Schroeder-Bernstein.
Here is a good map from $(1,30] \to (-2019,\infty)$:
$$f:(1,30] \to (0,1] \\ f(x) = \dfrac{x-1}{29} \\ g:(0,1] \to (0,1) \\ g(x) = \begin{cases}\dfrac{1}{n+1}, & x = \dfrac{1}{n}, n\in \mathbb{N} \\ x, & \text{otherwise}\end{cases}$$
And then you can use your existing $h,r,s$ to get the rest of the way.
A: There is a trick of finding a bijection $f:(0,1)\cup \{k\} \to (0,1)$ by $f(k) = \frac 12$ and $f(\frac 1{2^k}) = \frac 1{2^{k+1}}$ and $f(x) = x$ other wise.
Use that to get what we want.
Let $f:[23,30]\to [0,1]$ by simply stretching $23\mapsto 0$ and $30\mapsto 1$.  In other words $f(x) = \frac {x-23}7$.
Let $g:[23,30]\cup \{0,1\} \to [0,1]\cup \{2,3\}$ by letting $g(0)=2; g(1) = 3$ and for $23\le x \le 30$ let $g(x) = f(x)$.
Let $g_2:[0,1]\cup \{2,3\}\to (0,1]\cup\{2,3\}$ by letting $g_2(0) = \frac 12$ and $g_2(\frac 1{2^k})= \frac 1{2^{k+1}}$ and $g_2(x) = x$ other wise.
Let $g_3:(0,1]\cup\{2,3\}\to (0,1)\cup\{2,3\}$ by letting $g_3(1) = \frac 12$ and $g_3(\frac 1{2^k}=\frac 1{2^{k+1}}$ and $g_3(x)= x$ other wise.
Let $g_4:(0,1)\cup\{2,3\}\to (0,1)\cup\{3\}$ by letting $g_4(2) = \frac 12$ and $g_4(\frac 1{2^k}=\frac 1{2^{k+1}}$ and $g_4(x)= x$ other wise.
Let $g_5:(0,1)\cup\{3\}\to (0,1)$ by letting $g_4(3) = \frac 12$ and $g_5(\frac 1{2^k}=\frac 1{2^{k+1}}$ and $g_5(x)= x$ other wise.
And let $h:[23,30]\cup\{0,1\}\to (0,1)$by letting $h = g_5\circ g_4\circ g_3\circ g_2 \circ g$.
Now we can get $j:(0,1)\to (1,\infty)$ via $j(x)= \frac 1x$.
And we can finish with $k:(1,\infty)\to (-2019, \infty)$ via $k(x) = x-2020$.
And there we have it.  If $m:[23,30]\cup \{0,1\}\to (-2019,\infty)$ via $m = k\circ j\circ h$ is bijective.
A: You can use $\arctan x$ to prove $(a,b),\,a\lt b$ has the same cardinality as $\Bbb R$.  
Combine that with the fact that an infinite set union a finite set has the same cardinality as the infinite set ( in fact the union of a set and another set of smaller than or equal cardinality always has the same cardinality as the first set).  
Given an infinite set, take a sequence and then use a "shift" map, $x_n\to x_{n+1}$.  On the complement of the sequence let $f$ be the identity.  This shows adding an element to an infinite set doesn't change the cardinality.  Now iterate.
A: The function
$\tag 1 f(x) = \dfrac{1}{30-x}  - \dfrac{56533}{28}$
defines a bijective correspondence between the domain $(2,30) \subset \Bbb R$ and the target $(-2019,+\infty) \subset \Bbb R$.
We redefine $f$ on the subset $S$
$\tag 2 S = \{30-\frac{1}{n}\mid n \in \Bbb N\}$
by the (well-defined) mapping
$\tag 3 s = 30-\frac{1}{n} \mapsto f\big(30-\frac{1}{n+4}\big)$
giving a function we will denote by $\hat f$. 
It is easy to show that $\hat f:(2,30) \to (-2019,+\infty)$ is an injection that 'hits' every number in the target $(-2019,+\infty)$ except for the numbers $f(30-\frac{1}{1})$,$f(30-\frac{1}{2})$, $f(30-\frac{1}{3})$ and $f(30-\frac{1}{4})$.
We are now ready to define a bijection $F$ between the two sets $A$ and $B$:
$$   
    F(x) = \left\{\begin{array}{lr}
        f(30-\frac{1}{1}) , & \text{when } x = 0 \\
        f(30-\frac{1}{2}) , & \text{when } x = 1 \\
        f(30-\frac{1}{3}) , & \text{when } x = 2 \\
        f(30-\frac{1}{4}), & \text{when } x = 30 \\
        \hat f(x), & \text{otherwise}
        \end{array}\right\} 
$$
