According to stress-strain curve, we see that for same value of applied stress, strain produced is more in material $B$ than in material $A$ in linear region. Therefore, $A$ is ductile but $B$ is brittle. In ductile materials, yield point exists whereas in brittle material failure occurs without yielding. $A$ has yield point hence it is ductile. $B$ doesn't have yield point hence $B$ is brittle.