A point P is uniformly chosen inside a regular hexagon of side length 3. For each side of the hexagon a line is drawn from P to the point on that side which is closest to P. The probability that the sum of the lengths of these segments is less than or equal to 9v3 can be expressed as ab where a and b are coprime positive integers. What is the value of a+b?

To find the probability that the sum of the lengths of the segments is less than or equal to \(9\sqrt{3}\), we need to consider the possible positions of the point P within the regular hexagon.

Let's start by splitting the regular hexagon into six equilateral triangles by drawing lines from each vertex to the opposite vertex. We can then identify three types of regions within the hexagon based on the closest point on each side to P:

1. Triangle regions: These are the six equilateral triangles formed by connecting P to the closest points on each side of the hexagon. Each triangle has a side length of 3, and the sum of the length of the segments is always equal to the perimeter of the hexagon, which is 18.

2. Trapezoid regions: In each trapezoid region, the segment from P to the closest point on the base side is shorter than the other two segments. These trapezoids are formed by connecting two consecutive vertices of the hexagon with the point P. Since the side length of the hexagon is 3, the two base sides of each trapezoid have lengths of 3. The height of the trapezoid is equal to the distance between the base side and the opposite vertex of the hexagon, which is also 3. The sum of the lengths of the segments in each trapezoid region is equal to \(3 + 3 + 3 = 9\).

3. Pentagon region: The remaining region is a pentagon-shaped region in the center of the hexagon. In this region, the segment from P to the closest point on each side has the same length. The length of each segment is equal to the radius of the hexagon, which is \(\frac{3}{\sqrt{3}} = \sqrt{3}\). Since there are 5 segments in total, the sum of their lengths is \(5 \cdot \sqrt{3} = \sqrt{3} \cdot 3\) (using the fact that \(\sqrt{3} \cdot \sqrt{3} = \sqrt{3^2} = 3\)).

Now, let's determine the probability of each region occurring. Since the point P is uniformly chosen inside the hexagon, the probabilities are equivalent to the ratio of the areas of each region to the total area of the hexagon.

1. Triangle regions: Each triangle has an area equal to \(\frac{1}{2} \cdot 3 \cdot 3\) (using the formula for the area of an equilateral triangle). Since there are six of them, the total area occupied by the triangle regions is \(6 \cdot \frac{1}{2} \cdot 3 \cdot 3 = 27\).

2. Trapezoid regions: Each trapezoid has an area equal to the product of the average of the two base lengths and the height, which is \(\frac{1}{2} \cdot (3 + 3) \cdot 3 = 9\). Since there are six trapezoids, the total area occupied by the trapezoid regions is \(6 \cdot 9 = 54\).

3. Pentagon region: The area of the pentagon can be found by subtracting the total area of the triangle and trapezoid regions from the total area of the hexagon. The total area of the hexagon is \(\frac{3\sqrt{3}}{2} \cdot (3^2) = \frac{27\sqrt{3}}{2}\). Thus, the area of the pentagon region is \(\frac{27\sqrt{3}}{2} - 27 - 54 = \frac{27\sqrt{3}}{2} - \frac{108}{2} = \frac{27\sqrt{3} - 108}{2}\).

The probability that the sum of the lengths of the segments is less than or equal to \(9\sqrt{3}\) is equal to the ratio of the total area of the triangle, trapezoid, and pentagon regions to the total area of the hexagon:

\[
P = \frac{{27 + 54 + \left(\frac{27\sqrt{3} - 108}{2}\right)}}{{\frac{27\sqrt{3}}{2}}} = \frac{{135 + 54\sqrt{3} - 216}}{{27\sqrt{3}}} = \frac{{54\sqrt{3} - 81}}{{9\sqrt{3}}} = \frac{{6\sqrt{3} - 9}}{3} = 2\sqrt{3} - 3.
\]

Therefore, the value of \(a + b\) is \(2 + 3 = 5\).