Q:

How much Wealth should a character have when starting at 5th level?

We are starting a campaign with level 5 characters and my DM doesn't really know how to measure the wealth. He's usually very strict and pushes player to difficult challenges.
The DMG has a chart of wealth saying that at level 5 the character would have:
Expected Wealth Gain = 4,000 GP
Treasure per Character = 5,332 GP
I didn't understand the chart structure. Should the amount be the sum of it (9,332 GP or it would be the Treasure earned less the amount the character would have spent (5,332 GP - 1,332 GP (spent) = 4000 GP
Regardless, we are starting with about 2700gp  (we have to buy equipment) and I feel it kinda limits some of the fun.

A:

You're looking at the wrong table, you need the Wealth by Level table in the DMG, page 135.
For a level 5 character, the expected wealth is 9000 gp. But this assumes 4 party members, you could get less or more if you have more or less characters in your party. But that can be a burden if your DM doesn't want to do math, and you could also argue that you wouldn't get more or less though, as perhaps the encounters would be stronger/weaker for parties of more/less characters. See below for further explanation.
That chart you mentioned in your question is the Wealth Comparisons table on page 54 of the DMG, but this is only one of 3 major tables to consider. The three are:
Treasure Values per Encounter (TPE herein, DMG pg 51)
Wealth Comparisons (WCT herein, DMG pg 54)
Wealth by Level (WBL herein, DMG pg 135)
It's important to note the assumptions of the WCT -- it assumes 13.33 encounters per level gained, and four characters per party (see underneath the table). The expected wealth gain of 4000 gp you quoted is actually how much a character should make going from level 5 to level 6, and if you look at the WBL table you'll see that the expected wealth of a level 5 character is 9000 gp, and 13000 gp for a level 6 character (a difference of 4000).
The expected wealth gain is meant to be a "net profit" value, whereas the treasure per character is meant to be a "gross income" value. On the way from level 5 to 6, you should get 5332 gp worth of treasure, but spend 1332 gp on things like scrolls, potions, etc, and be left with 4000 gp extra. The Treasure per character is calculated from the TPE table: at level 5, the expected value of treasure per encounter is 1600 gp. Multiply by 13.33 encounters and divide by 4 characters to get 5332 gp.

A:

The table you want is "Character Wealth by Level", on page 135 of the DMG. According to that table, characters start with 9000gp at level 5.
The table in the question ("Wealth Comparisons", from the sidebar on page 54 of the DMG) can also be used to compute this, but it includes several additional layers of complexity.
The "Expected Wealth Gain" column is the net gain in wealth a character is expected to obtain over the course of that level. This is equal to the difference between each level's entry in the "Character Wealth by Level" table, so adding up all the rows before your starting level (e.g. 1-4 for level 5) will give your starting wealth (e.g. 900+1800+2700+3600 = 9000gp for level 5).
The "Treasure from Encounters" column is the average value 13.33 encounters at that level (i.e. the number of encounters necessary to go from the start of that level to the start of the next level); this represents roughly the gross amount of loot the whole party is expected to acquire over the course of that level.
Finally, the "Treasure per Character" column is 1/4 of the "Treasure from Encounters" column, rounded to a whole gp number. This represents roughly the gross amount of wealth a character is expected to obtain over the course of that level. This is higher than the "Expected Wealth Gain" column because characters are expected to spend some amount of wealth on things that lose value (consumable items, equipment whose resale value is less than its purchase price, lodging, services, bribes, etc.) over the course of their adventures.

