Finding an equivalent gap between fence boards for different length sections. I am literally trying to repair a fence in my backyard right now.  There are 4 fence posts in a line.  The distance between post 1 and post 2 is 67".  The distance between post 2 and post 3 is 88".  The distance between post 3 and post 4 is 89.5"
I have fence panels that are 5.375" wide.
I am trying to find a gap distance such that the gap between each post and its adjacent fence panels and the gap between each fence panel is the same between all 3 sections of the fence.
I think I have come up with 3 equations, but I don't know how to solve it, which is why I am turning to this community to help.  So, this is what I have so far:
Let `b` = # of boards between posts
let `g` = gap between.

So, for the first section:
67" = (b*5.375) + ((b + 1)*g)

And the second and third section is the equivalent equation, except 67 is 88 and 89.5 respectively.
Any way I can figure out the # of boards and the gap distance for these 3 sections mathematically?  
Maybe I'm overthinking things...Is there an easier way to determine an equivalent gap distance?
Edit:  And here is the completed fence, as promised.  First section gap: 31mm, second section 33mm, third section 35mm :)

 A: Let 


*

*$L_i$ be the distance from fence post $i$ to fence post $i+1$, 

*$a$ be the width of a fence panel,

*$b$ be the width of a gap between fence panels, and 

*$n_i$ be the number of fence panels on $L_i$. 


We then (as you correctly found) have $$L_i=n_ia+(n_i+1)b \implies n_i=\frac{L_i-b}{a+b}.$$
We demand that $n_i$ is some integer for the given $L_i$ and $a$ and with the variable $b$, but there is no guarantee that this will be solvable in all three cases ($i=1,2,3$) - in fact, it is very unlikely.
If you define some $\epsilon$ that $b$ is allowed to change for each panel, then there is some $b\pm\epsilon$ that should work (it is all a matter of how small we can make $\epsilon$), but since this is a practical problem, I'd go with a guesstimate and then simply do trial-and-error. 

EDIT: 
Here's a plot for $i=1$:

Here $b$ is on the $x$-axis, plotted in the range between 0" and 2". The values of $b$ that give integer values (i.e. number of panels) $8,9,10,11,12$ are 
$$2.66667,1.8625,1.20455,0.65625,0.192308.$$
I thought values of $b>3$ would be unacceptable, so I left those solutions out. Now, let's see if there are any of these $b$ that crop up again for the other $i$s:
For $i=2$ we have (for number of fence panels $11,12,13,14,15,16$):
$$2.40625,1.80769,1.29464,0.85,0.460938,0.117647.$$
And for $i=3$ we have (for number of fence panels $11,12,13,14,15,16$):
$$2.53125,1.92308,1.40179,0.95,0.554688,0.205882.$$
Now all one has to do is to find the triplet that lies in the smallest interval. 
We can plot these values of $b$ to easily see which ones are candidates:

$i=1$ is represented by the blue dots. From this it can be seen that the best approximation of $b$ is given by the lowest values of $b$ in each series (which is nice, because then there won't be such large gaps between the panels). 

This all means that you should choose 8, 11 and 11 panels for sections one, two and three, respectively. 

If a gap of $\sim 0.167$ is too small, the next best thing would be to choose 11, 15 and 15 panels, given a gap of $\sim 0.56$.
A: I did a quick trial-and-error calculation. It's not always possible to get an equal gap size between all fenceposts — but you can get close, which is the important thing.
If you use 11, 15, and 15 boards between your fenceposts, you'll have a gap size of around 1.25", 1.15", and 1.4". This should be just about as good as you can get if you want the gap sizes to be reasonably small.
