"He who presents to men infinite riches and an eternal life of blessedness in His kingdom as the reward of faithful obedience, will not accept a divided heart. We are living amid the perils of the last days, where there is everything to divert the mind and allure the affections from God. Our duty will only be discerned and appreciated when viewed in the light which shines from the life of Christ. As the sun rises in the east and passes toward the west, filling the world with light, so the true follower of Christ will be a light unto the world. He will go out into the world as a bright and shining light, that those who are in darkness may be lightened and warmed by the rays shining forth from him. Christ says of His followers: “Ye are the light of the world. A city that is set on an hill cannot be hid.” 3T 403.2"
"No man can serve two masters: for either he will hate the one, and love the other; or else he will hold to the one, and despise the other. Ye cannot serve God and mammon."
The EGW passage directly echoes the sentiment of Matthew 6:24 regarding undivided devotion to God. It also uses the 'light of the world' imagery from Matthew 5:14, but the core principle is from Matthew 6:24.