For non-intersecting triangles most of the time one of the triangle is completely on other side of the plane determined by the other triangle.
That is: putting the vertices vA to the plane equation of f(B) gives all positive (or zero) or all negative (or zero) values.
If this doesn't happen, one can try the other order.
After that we need to put the camera coordinate to the same equation so we know if the camera is in front or back of the reference triangle. The reference plane/triangle is now at distance zero, the other triangle at distance d and camera is at distance c. If signs of c and d are the same, the reference plane is the furthest one.
However, as DavidE pointed out, two non-intersecting triangles do not necessarily satisfy this condition. When the other order fails too, one must locate a separating plane.

IMO this could be achieved by inspecting up to 9 more reference plane candidates: select two vertices (i.e. edge) from triangle A and one vertex from triangle B as the separating plane candidate. Now the remaining vertex from triangle A should be in different side to the candidate reference plane than the two remaining vertices of triangle B. In this configuration two candidates out of 9 form a separating plane. By symmetry, it just may be, that one has to try the other 9 combinations as well (taking one edge at a time from B and one vertex from A).
It may be computationally more efficient to try the first two cases and simply split the other triangle with the reference plane. Splitting a triangle forms three triangles or one triangle and a polygon with a well defined drawing order. As a bonus, now actually intersecting triangles are handled too.