As you stated (I won't write the units of meters):
$$c+b=5, ~~~~~~~~~~~~~~~~~~~~~~ c^2=a^2+b^2.$$
You want to know either $c$ or $b$, so, you can write the first equation as $c=5-b$ or $b=5-c$. Now you can plug one of these into the second equation, and you would get an equation in terms of $a$ and $c$ or $b$, i.e. you CAN now solve for $b$ or $c$ and get the desired answer.