4. Anton was given a scale, and he started weighing his toys. A car was balanced by a ball and two cubes, and a car with a cube - two balls. How many cubes balance a car? (All of Anton's balls are the same, and the cubes are the same too.)
4. First method of solving. Since the machine is balanced by the ball and two cubes, the machine with a cube will be balanced by the ball and three cubes. From the second condition, we have that 2 balls balance a ball and 3 cubes, meaning one ball by mass is equal to 3 cubes. Thus, the machine can be balanced by 5 cubes.

Second method of solving. This problem can be solved analytically, for which each condition of the problem can be written as an equality:

$$
\begin{aligned}
& \mathrm{M}=\mathrm{Mball}+2 \mathrm{~K} \\
& \mathrm{M}+\mathrm{K}=2 \mathrm{Mball}
\end{aligned}
$$

Substituting into the second equality the sum of Mball $+2 K$ for M, we get

$$
\text { Mball + } 2 \mathrm{~K}+\mathrm{K}=2 \text { Mball. }
$$

From which it is easy to find that

$$
\text { 3K = Mball. }
$$

From the obtained ratio and the first equality, we get:

$$
\begin{gathered}
\mathrm{M}=2 \mathrm{~K}+3 \mathrm{~K} \\
\mathrm{M}=5 \mathrm{~K}
\end{gathered}
$$

Answer: the machine can be balanced by 5 cubes.