Observe the pattern of powers of $$A.$$
We have $$A^2= \begin{bmatrix} 1&2&3\\ 0&1&2\\ 0&0&1 \end{bmatrix}$$ and $$A^3= \begin{bmatrix} 1&3&6\\ 0&1&3\\ 0&0&1 \end{bmatrix}$$
Hence, by induction,
$$A^n=\begin{bmatrix}1&n&\frac{n(n+1)}2\\0&1&n\\0&0&1\end{bmatrix}$$
Therefore,
$$A^{50}=\begin{bmatrix}1&50&1275\\0&1&50\\0&0&1\end{bmatrix}$$
Now find its inverse.
Using the standard inverse form for such upper triangular matrices,
$$A^{-n}=\begin{bmatrix}1&-n&\frac{n(n-1)}2\\0&1&-n\\0&0&1\end{bmatrix}$$
Thus,
$$A^{-50}= \begin{bmatrix} 1&-50&1225\\ 0&1&-50\\ 0&0&1 \end{bmatrix}$$
Given,
$$A^{50}B= \begin{bmatrix} 1&0&0\\ 0&2&0\\ 0&0&3 \end{bmatrix}$$
Hence,
$$B= A^{-50} \begin{bmatrix} 1&0&0\\ 0&2&0\\ 0&0&3 \end{bmatrix}$$
$$= \begin{bmatrix} 1&-50&1225\\ 0&1&-50\\ 0&0&1 \end{bmatrix} \begin{bmatrix} 1&0&0\\ 0&2&0\\ 0&0&3 \end{bmatrix}$$
$$= \begin{bmatrix} 1&-100&3675\\ 0&2&-150\\ 0&0&3 \end{bmatrix}$$
The first row of $$B$$ is $$[1,\,-100,\,3675]$$ Hence the required sum is $$1-100+3675$$
$$=3576$$