Let the width of the border be x m.
The length and breadth of the carpet are 8 m and 5 m, respectively.
Area of the carpet = 8 x 5 = 40m2
Length of the carpet without border = (8 - 2x)
Breadth of carpet without border = (5 - 2x)
Area of the border 12 m2
Area of the carpet without border = (8 - 2x)(5 - 2x)
Thus, we have:

\(\Rightarrow x=\frac{1}{2}\) and \(x=6\)
Because the border cannot be wider than the entire carpet, the width of the carpet is \(\frac{1}{2}m,\) i.e., 50 cm.