Let's call the base of the first triangle $x$, the base of the second $\frac{8}{7}x$. The other side of the first and of the second will be $y$ and $z$. We'll have:
$$ \left\{\begin{matrix}
x+2y=\frac{8}{7}x+2z\\
x\sqrt{y^2-\frac{x^2}{4}}=\frac{8}{7}x\sqrt{z^2-\frac{16x^2}{49}}
\end{matrix}\right.\Rightarrow \left\{\begin{matrix}
x+2y=\frac{8}{7}x+2z\\
\left(y-\frac{x}{2}\right)\left(y+\frac{x}{2}\right)=\frac{64}{49}\left(z-\frac{4x}{7}\right)\left(z+\frac{4x}{7}\right)
\end{matrix}\right.$$
[The first equation is the equality of the two perimeters, the second the one of areas(in which I calculated the height with the Pythagora Theorem). Then we squared the second equation and scomposed the two differences of squares]
Now there is a little trick! Multiply both sides of the second equation by $2$:
$$ \left\{\begin{matrix}
x+2y=\frac{8}{7}x+2z\\
\left(y-\frac{x}{2}\right)\left(x+2y\right)=\frac{64}{49}\left(z-\frac{4x}{7}\right)\left(\frac{8x}{7}+2z\right)
\end{matrix}\right.$$
Since $\left(x+2y\right)$ and $\left(\frac{8x}{7}+2z\right)$ are equal for the first equation we can simplify them and obtain a linear system:
$$ \left\{\begin{matrix}
x+2y=\frac{8}{7}x+2z\\
\left(y-\frac{x}{2}\right)=\frac{64}{49}\left(z-\frac{4x}{7}\right)
\end{matrix}\right.$$
Now we can easily solve this for $(y,z)$ and obtain:
$$ \left\{\begin{matrix}
x=x\\
y=\frac{233}{210}x \\
z=\frac{109}{105}x
\end{matrix}\right.$$
Notice that since the sides are integer, at least $x=210$
Since the perimeter is:
$$P(x)=x+2y=x+2\frac{233}{210}x=\frac{338}{105}x$$
And the minimum is:
$$P(210)=676$$
:)