let us say, the first triangle has a side "a",
and the second triangle, has a corresponding side
of "b",
so, the scale factor for the triangles is a to be or a:b
or a/b
now.... the relation of a/b to areas and volumes is [tex]\bf \textit{scale factor relations}\\\\ \begin{array}{llll}
sides&\cfrac{a}{b}
\\\\
Area&\cfrac{a^2}{b^2}
\\\\
Volume&\cfrac{a^3}{b^3}
\end{array}[/tex]
now, taking a peek at your triangles
the volumes are 512 and 1331
so, the scale factor would be [tex]\bf \cfrac{512}{1331}=\cfrac{a^3}{b^3}\implies
\begin{cases}
\sqrt[3]{512}=a\\
----------\\
\sqrt[3]{1331}=b
\end{cases}\implies \textit{scale factor of }\cfrac{a}{b}[/tex]