SB 4.7.50

śrī-bhagavān uvāca
ahaṁ brahmā ca śarvaś ca
 jagataḥ kāraṇaṁ param
ātmeśvara upadraṣṭā
 svayan-dṛg aviśeṣaṇaḥ
Word for word: 
śrī-bhagavān — Lord Viṣṇu; uvāca — said; aham — I; brahmā — Brahmā; ca — and; śarvaḥ — Lord Śiva; ca — and; jagataḥ — of the material manifestation; kāraṇam — cause; param — supreme; ātma-īśvaraḥ — the Supersoul; upadraṣṭā — the witness; svayam-dṛk — self-sufficient; aviśeṣaṇaḥ — there is no difference.
Translation: 
Lord Viṣṇu replied: Brahmā, Lord Śiva and I are the supreme cause of the material manifestation. I am the Supersoul, the self-sufficient witness. But impersonally there is no difference between Brahmā, Lord Śiva and Me.
Purport: 

Lord Brahmā was born out of the transcendental body of Lord Viṣṇu, and Lord Śiva was born out of the body of Brahmā. Lord Viṣṇu is therefore the supreme cause. In the Vedas also it is stated that in the beginning there was only Viṣṇu, Nārāyaṇa; there was no Brahmā or Śiva. Similarly, Śaṅkarācārya confirmed this: nārāyaṇaḥ paraḥ. Nārāyaṇa, or Lord Viṣṇu, is the origin, and Brahmā and Śiva are manifested after creation. Lord Viṣṇu is also ātmeśvara, the Supersoul in everyone. Under His direction, everything is prompted from within. For example, in the beginning of the Śrīmad-Bhāgavatam it is stated, tene brahma hṛdā: He first educated Lord Brahmā from within.

In Bhagavad-gītā (10.2) Lord Kṛṣṇa states, aham ādir hi devānām: Lord Viṣṇu, or Kṛṣṇa, is the origin of all demigods, including Lord Brahmā and Lord Śiva. In another place in Bhagavad-gītā (10.8) Kṛṣṇa states, ahaṁ sarvasya prabhavaḥ: “Everything is generated from Me.” This includes all the demigods. Similarly, in the Vedānta-sūtra: janmādy asya yataḥ. And in the Upaniṣads is the statement yato vā imāni bhūtāni jāyante. Everything is generated from Lord Viṣṇu, everything is maintained by Him, and everything is annihilated by His energy. Therefore, by their actions and reactions, the energies which come from Him create the cosmic manifestations and also dissolve the whole creation. Thus the Lord is the cause and also the effect. Whatever effect we see is the interaction of His energy, and because the energy is generated from Him, He is both cause and effect. Simultaneously, everything is different and the same. It is said that everything is Brahman: sarvaṁ khalv idaṁ brahma. In the highest vision, nothing is beyond Brahman, and therefore Lord Brahmā and Lord Śiva are certainly nondifferent from Him.