Since you are given angle A, I suspect you mean angles B and C!
Let 'a' be the length of the side from B to C. The law of cosines says:
a2 = b2 + c2 - 2*b*c*cos(A)
Put the known information in here:
a2 = 62 + 72 -2*6*7*cos(40°)
so 'a' is the square root of the right-hand side:
$${\mathtt{a}} = {\sqrt{{{\mathtt{6}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{7}}}^{{\mathtt{2}}}{\mathtt{\,-\,}}{\mathtt{2}}{\mathtt{\,\times\,}}{\mathtt{6}}{\mathtt{\,\times\,}}{\mathtt{7}}{\mathtt{\,\times\,}}\underset{\,\,\,\,^{\textcolor[rgb]{0.66,0.66,0.66}{360^\circ}}}{{cos}}{\left({\mathtt{40}}^\circ\right)}}} = {\mathtt{a}} = {\mathtt{4.544\: \!476\: \!513\: \!087\: \!508\: \!5}}$$
Now we can use the cosine rule in a rearranged form to get cos(B):
cos(B) = (a2 + c2 - b2)/(2*a*c) or B = cos-1((a2 + c2 - b2)/(2*a*c))
$${\mathtt{B}} = \underset{\,\,\,\,^{\textcolor[rgb]{0.66,0.66,0.66}{360^\circ}}}{{cos}}^{\!\!\mathtt{-1}}{\left({\frac{\left({{\mathtt{4.544\: \!476\: \!513}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{7}}}^{{\mathtt{2}}}{\mathtt{\,-\,}}{{\mathtt{6}}}^{{\mathtt{2}}}\right)}{\left({\mathtt{2}}{\mathtt{\,\times\,}}{\mathtt{4.544\: \!476\: \!513}}{\mathtt{\,\times\,}}{\mathtt{7}}\right)}}\right)} = {\mathtt{B}} = {\mathtt{58.066\: \!464\: \!967\: \!59^{\circ}}}$$
You could use the cosine rule again changing 'b' for 'c' to find angle C if you like. However, it's probably easier to get it by knowing that A + B + C = 180°
$${\mathtt{C}} = {\mathtt{180}}{\mathtt{\,-\,}}{\mathtt{40}}{\mathtt{\,-\,}}{\mathtt{58.066\: \!465}} = {\mathtt{C}} = {\mathtt{81.933\: \!535}}$$°
Also, having obtained the size of 'a' it might have been easier to use the sine rule to find B (sin(B)/b = sin(A)/a).