so... the alloy with 5% titanium is ...some alloy :), so is a mixed metal and among its mix it has 5% of titanium, it has other metals, but only 5% is titanium.
that means that if the amount of it is say "x", then the amount of titanium in it will be 5% or (5/100) * x, or 0.05x.
now, the 25% titanium, is the same issue, if say a quantity of "y" will only have 25% of titanium, regardless of other metals, so in "y" there is 25% or (25/100) * y, or 0.25y.
so, we need a mixture that yields only a 13% alloy, or 13/100, and will be 100 grams, so the amount of titanium in it will then be (13/100) * 100 or 13.
[tex]\bf \begin{array}{lccclll}
&\stackrel{grams}{amount}&\stackrel{\%}{quantity}&\stackrel{concentrated}{quantity}\\
\textit{5\% alloy}&x&0.05&0.05x\\
\textit{25\% alloy}&y&0.25&0.25y\\
------&------&------&------\\
mixture&100&0.13&13
\end{array}
\\\\\\
\begin{cases}
x+y=100\implies \boxed{y}=100-x\\
0.05x+0.25y=13\\
----------\\
0.05x+0.25\left( \boxed{100-x} \right)=13
\end{cases}
\\\\\\
0.05x-0.25x+25=13\implies -0.20x=-12\implies x=\cfrac{-12}{=0.20}
\\\\\\
x=\stackrel{grams}{60}[/tex]
how much of the 25% alloy will be needed? well, y = 100 - x.