Basic Answer:
You can't.
Here's what you can know
Given only the length of two sides of a triangle, the length of the third side is not fixed. Let a and b represent the lengths of the two known sides such that $a \geq b$. Let c represent the length of the unknown side, the length of c must fall within
$a - b < c < a + b$
Based on the example triangle you give, the third side, c, must be
\begin{align}
475 - 390 <& c < 475 + 390 \\
85 <& c < 865
\end{align}
More Detail
With the two given lengths, we can construct a segment and a circle. It is irrelevant where we choose to position the segment. It's endpoints can lie anywhere with the caveat that it has a length exactly equal to the first known side. For your example let the segment have length 475.
With the second side we can represent all possible endpoints as the points of a circle. This makes sense since a circle is the set of all points a given distance away from the center point. So the circle would have radius 390.
Well, you want to know the third side of the triangle, but the third side -- without any other information about the triangle -- could be any segment which starts at the free endpoint of our original segment and has its other endpoint on the circle. You can see why this means that there is more than one possible segment length because not all such segments have equal length. Here are a few examples.
Closing Remarks
If you want to calculate the third side of the triangle, you need more information than simply two sides. For example, if you know the triangle is a right triangle, or if you know the measure of the included angle between the two known segments, then you can determine the length of the third side.
The equilateral triangle with the largest length should first be created at the corner. This is because any other equilateral triangle that fits can be translated such that one of its vertices is a corner of the rectangle.
Now, we need to split the problem into two cases:
1) $l\ge \frac{w}{\sqrt3}$: The largest triangle is the one with length $l$ (in dimension $l$) and height $l\sqrt{3}$ (in dimension $w$). If we try to use a different angle, we will only get shorter sides.
2) $l\le\frac{w}{\sqrt{3}}$: In this case, we want one vertice of the triangle to be one of the rectangle's vertices and the other two on the sides of the rectangle such that none contain the vertice shared by the rectangle and triangle.
One method to approach this is imaginary coordinates. First, let us put the vertice that the rectangle and triangle share as the origin. We can set up the rectangle's coordinates as $(0,0),(0,l),(l,w),(0,w)$.
Let $(l,x)$ be the point at which the triangle meets one side. ($x$ is an unknown variable and $l$ is the length.) Therefore, by imaginary coordinate rotation, we get that the $y$-coordinate of the point rotated $60^\circ$ counterclockwise about the origin is $\frac{x}2+\frac{l\sqrt{3}}2$, which must also be $w$. (This is because the rotation of that point $60^\circ$ is supposed to be the third vertice of the triangle and is on the top side of the rectangle.) From here, we get $x+l\sqrt{3}=2w\rightarrow x=2w-l\sqrt{3}$.
The length of one side is $\sqrt{l^2+(2w-l\sqrt{3})^2}$ via distance formula.
Best Answer
Yes, and any such triangle is called a degenerate triangle. If the distance between two points $a$ and $b$ is zero, then the corresponding vertex $\overline{ab}$ is the zero vector, which is collinear to every vector (which includes $\overline{ac}$ and $\overline{bc}$). Hence the vectors defining the triangle are all collinear, i.e., a degenerate triangle.
As to your question regarding a "Triangle Inequality Test", this "test" seems likely to be a teaching tool for classification rather than a definitive rule. But the triangle inequality itself does permit equality which occurs if and only if the triangle is degenerate.
Permitting degenerate triangles can greatly reduce the number of special cases in integration over polygons, as an example of mathematical use.