imagine there are two right angle triangles with the same hypotenuse length , can the sum of the other two sides be different? or what if it's not a right angle triangle can the sum of the other two sides still be different?

imagine there are two right angle triangles with the same hypotenuse length , can the sum of the other two sides be different? or what if it's not a right angle triangle can the sum of the other two sides still be different?

On
Let $\triangle ABC$ be right, with the right angle at $C$, and hypotenuse length $h$. Then the other two sides add to $h\sin\theta +h\cos\theta$, where $\theta$ is one of the other angles in the triangle. So suppose two right triangles share the same hypotenuse $h$ and the sum of their other sides is the same. If $\theta_1$ and $\theta_2$ are respective angles for the two triangles, we must have $$\sin\theta_1+\cos\theta_1=\sin\theta_2+\cos\theta_2.$$ Multiply both sides by $\frac\pi4$ and use the trig identity $\sin(A+B)=\sin A\cos B+\cos A\sin B$ to conclude that $$\sin\left(\theta_1+\frac\pi4\right)=\sin\left(\theta_2+\frac\pi4\right),$$ and deduce that $\theta_1=\theta_2$, and so the two triangles are congruent. (This includes the triangles being mirror images of each other.)
If we're not comparing purely right triangles, it is easy to find two non-right triangles that share one side but differ in the sum of the other sides. It's also possible for non-congruent triangles to have one side the same length and the same sum for the other two sides. Consider an isosceles triangle with side lengths $4$, $4$, $6$ and another isosceles triangle with side lengths $4$, $5$, $5$.
I don't know how to prove it but I do not think it is possible to have two noncongruent right triangles with the same leg-sum, whether or not the hypotenuse is the same.
There are $\,2^{n-1}\,$ primitive Pythagorean triples for every hypotenuse value where $\,n\,$ is the number or distinct prime factors of the hypotenuse. In your example, you compared a primitive $(7,24,25)$ and an imprimitive $(15,20,25)$ but primitive examples are for hypotenuse values shown more than once in this lising. For example, $\,65=5\cdot13\,$ and the $2^{2-1}=2\,$ primitive triples for that value are $\quad(33,56,65)\quad$ and $\quad(63,16,65).\quad$ In this example, the sums are $89\,$ and $\,79.\quad$
In greater examples, we have $\,1105=5\cdot13\cdot17\,$ and the $\,2^{3-1}=4\,$ primitive triples are
\begin{equation*} F(24,23)=(47,1104,1105)\quad F(31,12)=(817,744,1105)\\ F(32,9)=(943,576,1105)\quad F(33,4)=(1073,264,1105) \end{equation*}
where Euclid's formula $f(m,k)$ for generating them is shown here as $$A=m^2-k^2 \qquad B=2mk \qquad C=m^2+k^2$$
$\textbf{Edit}:\quad$ To find triples with matching hypotenuses, we solve for $\,k\,$ and test a defined range of $\,m$-values to see which, if any, yield integers.
Matching side C using $F(m,k)\qquad C=(4x+1), x\subset\mathbb{N}$ $$C=m^2+k^2\implies k=\sqrt{C-m^2}\\ \qquad\text{for}\qquad \bigg\lfloor\frac{ 1+\sqrt{2C-1}}{2}\bigg\rfloor \le m \le \lfloor\sqrt{C-1}\rfloor$$ The lower limit ensures $m>k$ and the upper limit ensures $k\in\mathbb{N}$. $$C=65\implies \bigg\lfloor\frac{ 1+\sqrt{130-1}}{2}\bigg\rfloor=6 \le m \le \lfloor\sqrt{65-1}\rfloor=8\quad \\ \text{and we find} \quad m\in\{7,8\}\implies k\in\{4,1\}\\$$ $$F(7,4)=(33,56,65)\qquad \qquad F(8,1)=(63,16,65) $$