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:
a=√62+72−2×6×7×cos360∘(40∘)=a=4.5444765130875085
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))
B=cos360∘−1((4.5444765132+72−62)(2×4.544476513×7))=B=58.06646496759∘
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°
C=180−40−58.066465=C=81.933535°
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).