Let $\varphi$ be any mapping from a set $A$ to a set $B$. Show that composition by $\varphi$ is a linear mapping from $\mathbb{R}^B$ to $\mathbb{R}^A$. That is, show that $T:\mathbb{R}^B \rightarrow \mathbb{R}^A$ defined by $T(f) = f \circ \varphi$ is linear.
To show that a mapping is linear, we must demonstrate that the vector operations are preserved.
I am unclear about the wording here "composition by $\varphi$ is a linear mapping from $\mathbb{R}^B$ to $\mathbb{R}^A$" which implies to me that the composition by $\varphi$ leads to an inverse of $\varphi$ mapping defined previously from set $A$ to set $B$, but I don't know why. I am getting a lot of confusion here and I think that I am interpreting the problem wrong.
I believe I have to show that $$f(\varphi_1 + \varphi_2) = f(\varphi_1) + f(\varphi_2)$$ and $$cf(\varphi) = f(c \varphi)$$ to show that the mapping is linear, but I am not sure how to get started.
Let $f,g\in\mathbb{R}^B$ and $a\in\mathbb{K}$.
We have to show, that $T(af+g)=aT(f)+T(g)$
Then $T(af+g)=(af+g)(\varphi)$ by definition of $T$.
$(af+g)(\varphi)=(af)(\varphi)+g(\varphi)$ by definition of $+$ 'for functions' [$(f+g)(x):=f(x)+g(x)$]
$(af)(\varphi)+g(\varphi)=af(\varphi)+g(\varphi)$ by definition of $\cdot$ 'for functions' [$(af)(x)=a\cdot f(x)$]
$af(\varphi)+g(\varphi)=af\circ\varphi+g\circ\varphi=aT(f)+T(g)$