Calculating the distribution of the random variable Y at the output
Solution 1:
What you have is a matrix of conditional probabilities, with the entry in row $i$, column $j$ of $T$ corresponding to $P(Y=y_j|X=x_i)$. To find the marginal distribution of $Y$, use the law of total probability:
$$P(Y=y_j)=\sum_{i=1}^4 P(Y=y_j|X=x_i)P(X=x_i)$$
Note: If $p$ represents a $1\times 4$ row vector summarizing the probability masses of $X$, then $pT$ is a $1\times 3$ row vector summarizing the masses of $Y$.