In both the cases i dont think the triangle will be formed as in a 5+7=12< 14 and in b, 5+7= 12=12 . But if it is urgent then u can take as 7 cm.
draw a line AB=7cm. On point A with radius 5cm draw and arc. On point B with radius 14cm and draw another arc intersecting the previous at C. join ac and BC. Thus triangle ABC is formed.
B) draw a line QR= 7cm. On point Q, draw an arc with radius 5cm. ON point P draw another arc with radius 12cm intersecting the previous at P. Join PQ and PR. Thus triangle PQR is formed
But the triangle will not be formed as in both the cases the sum of two sides is smaller or equal to the third side