edit:
Let $A=\{x \in \Bbb R \mid 0\le x \le 1\}$ and $B=\{x \in \Bbb R \mid 5\le x \le 8\}$. Let $f:A \to B$ defined by $f(x) = 5+(8-5)x$ for all $x \in A$. Show that $f$ is bijective.
Attempt:
$f$ is injective: Let $x_1,x_2 \in A$ and assume that $f(x_1) = f(x_2)$. Then, $5+(8-5)x_1 = 5+(8-5)x_2$ i.e. $x_1=x_2$. Thus, $f$ is injective.
$f$ is surjective: Let $y \in B$. Then, there exists $x=\frac{y-5}{3} \in A$ such that $f(x)=f(\frac{y-5}{3}) = 5+(8-5)\left(\frac{y-5}{3}\right) = 5+y-5 = y$. This means that $f$ is surjective.
Thus, $f$ is bijective.
Is the above correct?