In the vertical direction, there is no motion, normal force and weight cancel out.
In the horizontal direction applying
Newton's Second Law
\[ \bbox[#99CCFF,10px]
{\vec{F}=m\vec{a}}
\]
\[
T=m_{\text{A}}a \tag{I}
\]
In the vertical direction, there is no motion, normal force and weight cancel out.
In the horizontal direction applying
Newton's Second Law
\[
F-T=m_{\text{B}}a \tag{II}
\]
Expressions (I) and (II) can be written as a system of linear equations with two variables
(
T and
a)
\[
\left\{
\begin{array}{rr}
T&=m_{\text{A}}a\\
F-T&=m_{\text{B}}a
\end{array}
\right.
\]
substituting (I) into (II) we have the acceleration
\[
F-m_{\text{A}}a=m_{\text{B}}a\\
F=m_{\text{A}}a+m_{\text{B}}a
\]
factoring the acceleration
\[
F=a\;(\;m_{\text{A}}+m_{\text{B}}\;)\\
a=\frac{F}{m_{\text{A}}+m_{\text{B}}}\\
a=\frac{15}{0.35+1.15}\\
a=\frac{15}{1.5}
\]
\[ \bbox[#FFCCCC,10px]
{a=10\;\text{m/s}^{2}}
\]
Note: The rope connecting the two blocks is ideal, we can consider it inextensible and of negligible
mass, the rope only transmit the force from one block to the other block. The two blocks form a set subjected to
the same force, both have the same acceleration, the system behaves as if it were a single block of total mass
given by the sum of the masses of the two blocks A and B.
Substituting the acceleration found in expression (I) we have the tension on the rope
\[
T=0.35\times10
\]
\[ \bbox[#FFCCCC,10px]
{T=3.5\;\text{N}}
\]
Note: In the same way we could substitute the acceleration in the expression (II) to obtain the
tension on the rope, in this case:
\[ 15-T=1.15\times10\Rightarrow 15-T=11.5\Rightarrow T=15-11.5\Rightarrow T=3.5\;\text{N} \]