Finding the width of a rectangle