A shape is called a rectangle when the opposite sides are equal. If in a rectangle all four sides are equal then it is called a Square.
To calculated the perimeter of a rectangle we have to sum total length of all its four sides.
Perimeter of rectangle ABCD = A+B+C+D
But since opposite sides are equal then A=C and B=D
hence our formula will be 2A+2B= 2(A+B)