We are given the following 3 essential/Dirichlet boundary conditions (BCs)
$$ y_1(0)~=~0~=~y_2(0), \qquad y_1(b)-y_2(b)~=~1-b.\tag{1} $$
That is 1 BC short of a well-posed variational problem.
If we vary infinitesimally OP's functional
$$J[y]~:=~b+ \int_0^b\! dx~ \sum_{i=1}^2 y^{\prime}_i(x)^2,\tag{2}$$
while paying attention to boundary contributions. The infinitesimal variations $\delta y_i$ must obey the BCs (1), i.e.
$$ \delta y_1(0)~=~0~=~\delta y_2(0), \qquad \delta y_1(b)~=~\delta y_2(b).\tag{3} $$
We find
$$ \delta J[y]~\stackrel{(2)}{=}~ 2\int_0^b\! dx~ \sum_{i=1}^2y^{\prime}_i(x) ~\delta y^{\prime}_i(x)$$
$$~\stackrel{\text{int. by parts}}{=}~ \sum_{i=1}^2\left( y^{\prime}_i(b)~\delta y_i(b)-y^{\prime}_i(0)~\delta y_i(0) - 2\int_0^b\! dx~ y^{\prime\prime}_i(x) ~\delta y_i(x)\right)$$
$$~\stackrel{(3)}{=}~ \underbrace{(y^{\prime}_1(b)+y^{\prime}_2(b))}_{\text{natural BC}}~
\underbrace{\delta y_1(b)}_{\text{essential BC}}
- 2\int_0^b\! dx~\sum_{i=1}^2 \underbrace{y^{\prime\prime}_i(x)}_{\text{EL eqs.}} ~\delta y_i(x).\tag{4}$$
The above should vanish at a stationary point. To have a well-posed variational problem, we must impose one more essential or natural BC. Any other BC would make the variational problem (2) ill-posed.
We read of from eq. (4) that the natural BC is
$$ y^{\prime}_1(b)+y^{\prime}_2(b)~=~0 ,\tag{5}$$
which is OP's main question.