Let's rewrite the problem statement in terms of graphs: in the graph the degree of each vertex is not more than four. Prove that all edges can be painted in two colors so that there are no single-color triangles.
Let our graph have n vertices. We prove the statement of the problem by induction on the number of vertices.
Base case: if n=1,2 everything is obvious
Assume the statement is true for any graph with n≤k vertices. Consider a graph with n=k+1 vertices. Select the vertex A arbitrarily. Remove this vertex from the graph as well as all edges from A. Thus we have a graph with n=k vertices, that, by the induction hypothesis, can be painted as needed. Now paint vertex A with its edges. Consider three cases.
I. The degree of each vertex A is not more than 2. Then paint all edges from A in different colors, which proves the problem statement.
II. The degree vertex A is equal to 3, that is there is exactly 3 edges AX,AY and AZ (Fig. 42); the dotted line means it is not significant whether there is a corresponding edge. We know that the edges of ΔXYZ have different colors. Let, for instance, XY be painted in the first color YZ – the second color. Let's paint the edges as shown on Fig. 42: AX and AY – in the second color, and AZ – first. By the induction hypothesis the statement is proved.

Fig. 42
III. The degree vertex A is equal to 4, that is there are the following edges from A: AP,AQ,AR and AS.
a) If the graph on the vertices P,Q,R,S is complete, we have a separate connected component on the vertices A,P,Q,R,S. Wherein by the induction hypothesis it is a complete graph. Then let's paint its edges as shown on Fig. 43 and the statement is proved. Since all other vertices form a graph with less then k vertices, by the induction hypothesis, it is painted as needed.

Fig. 43
b) If the graph on the vertices P,Q,R,S is not complete, suppose there that there is no edge QR. Let's paint the edges AP,AQ in a color, opposite to the edge PQ, and the edges AR,AS – in a color, opposite to the edge RS. It is straightforward to check that there are no single-color triangles. Hence, by the induction, the problem statement is proved.