The perimeter of a triangle is 21. The smallest side is 3. The 2nd side is twice the smallest side. The 3rd side is 6 more than the 2nd side. Write an equation to solve the perimeter.