A rectangle 9cm long is equal on area to a square which has a perimeter of 24cm. find the width of the rectangle​