It seems that you are confusing certain representations of squares and rectangles with the shapes themselves. In particular, we can define:
A rectangle is a quadrilateral with all right angles.
A square is a quadrilateral with all right angles and congruent sides.
Here, if we take any square, we see that it is a quadrilateral with all right angles, hence a rectangle.
What you are doing is coming up with a certain representation of squares and rectangles and claiming that, since these are not equal, squares are not rectangles. In particular, if we imagine looking at only squares and rectangles centered at the origin with sides parallel the axes, any pair of two positive real numbers can be associated to a rectangle and any single real number can be associated to a square - but these are just associations (i.e. functions from $\mathbb R$ and $\mathbb R\times \mathbb R$ to the set of squares and rectangles respectively), not equalities.
A similar argument could show that squares aren't squares: Clearly, a square centered on the origin with sides parallel the axes can be represented by a single real number giving its side length. But it can also be represented by a point on the line $x=y$ giving one of its corners! Since these representations are different, should we conclude that squares are not squares?