If coordinates of two vertices (x1,y1) and (x2,y2)of a triangle is given and coordinates of centroid(a,b) of a triangle is given then coordinates of third vertex(x3,y3) can be found out as (3*a-x1-x2, 3*b-y1-y2)
Because cordinated of centroid is [(x1+x2+x3)/3, (y1+y2+y3)/3]