For the U.S. Treasury Yield example, it's anecdotal but I'm factoring in every expense (mortgage, repairs, taxes, etc.). Most people don't pay attention to those expenses and then they look at the money they get rather than calcualting the compounded annual return on that money. If you have tenants, it's a completely different story and those properties can be very profitable.
For the dividend stocks, I am also assuming the dividend price hike of 2.88% per year (i.e. a company with an annualized $1.00 dividend bumps it up to $1.03 the following year). This is not farfetched for 4% yielders and many companies that issue dividends pride themselves on their streaks for raising the dividend. I use 2.88% in this example because it adds up to the 7% cashflow growth rate. The dividend reinvestment accounts for 4% of the growth and the dividend hike accounts for the rest.