Background
As noted in the question, there is a belief that the different names are a result of different sources writing at different times. At Genesis 2:4 the notes of the NET Bible state:
Advocates of the so-called documentary hypothesis of pentateuchal authorship argue that the introduction of the name Yahweh (LORD) here indicates that a new source (designated J), a parallel account of creation, begins here. In this scheme Gen 1:1-2:3 is understood as the priestly source (designated P) of creation. 1
It also states there is criticism of the Documentary Hypothesis:
Critics of this approach often respond that the names, rather than indicating separate sources, were chosen to reflect the subject matter (see U. Cassuto, The Documentary Hypothesis). Gen 1:1–2:3 is the grand prologue of the book, showing the sovereign God creating by decree. The narrative beginning in 2:4 is the account of what this God invested in his creation. Since it deals with the close, personal involvement of the covenant God, the narrative uses the covenantal name Yahweh (Lord) in combination with the name God. For a recent discussion of the documentary hypothesis from a theologically conservative perspective, see D. A. Garrett, Rethinking Genesis. For an attempt by source critics to demonstrate the legitimacy of the source critical method on the basis of ancient Near Eastern parallels, see J. H. Tigay, ed., Empirical Models for Biblical Criticism. For reaction to the source critical method by literary critics, see I. M. Kikawada and A. Quinn, Before Abraham Was; R. Alter, The Art of Biblical Narrative, 131-54; and Adele Berlin, Poetics and Interpretation of Biblical Narrative, 111-34. 1
Similar to subject, a rabbinic explanation for the different uses is the character of God:
The Talmud many times mentions God’s two character traits – the trait of mercy and the trait of justice. Mercy is represented by the name YHVH while justice is represented by Elohim (see Midrash Braishis Rabbah 73:3). 2
Given these potential exceptions to the Documentary Hypothesis, and the OP’s citation of the texts of the account of Noah, the question considered here is:
“Do the texts [specifically the account of Noah] expose a purpose, in the expression of the two names in the different contexts, [namely either in subject matter or the character of God]?
Analysis
First, some texts describe unity of identity of Elohim and YHVH:
Unity of Identity
And those that entered, male and female of all flesh, went in as God had commanded him. And the LORD shut him in. (7:16) 3
LORD: But Noah found favor in the eyes of the LORD. (6:8)
God: …Noah walked with God. (6:9)
LORD: So the LORD said, “I will blot out man whom I have created from the face of the land, man and animals and creeping things and birds of the heavens… (6:7)
God: For behold, I will bring a flood of waters upon the earth to destroy all flesh in which is the breath of life under heaven. Everything that is on the earth shall die. (6:17)
This unity is also demonstrated in their work:
Unity of Work
LORD: So the LORD said, “I will blot out man whom I have created from the face of the land, man and animals and creeping things and birds of the heavens… (6:7)
God: For behold, I will bring a flood of waters upon the earth to destroy all flesh in which is the breath of life under heaven. Everything that is on the earth shall die. (6:17)
LORD: but of the tree of the knowledge of good and evil you shall not eat... (2:17)
God: But you shall not eat flesh with its life, that is, its blood. (9:4)
LORD: ...for in the day that you eat of it you shall surely die.” (2:17)
God: And for your lifeblood I will require a reckoning… (9:5)
Both the LORD and God state they will bring about the destruction of mankind: they act as one. Also in the creation account it was the LORD who gave a restriction on what can be eaten; in the flood account the restriction is given by God. Likewise in creation it is the LORD who assigns a consequence to violating the restriction; in the flood account it is God. The work of the God in the account with Noah is patterned after the work of the LORD in the account with Adam.
Second, by repeating actions from creation, the texts demonstrate the unchanging nature of God:
Unchanging Nature
And God blessed them. And God said to them, “Be fruitful and multiply and fill the earth… (1:28)
And God blessed Noah and his sons and said to them, “Be fruitful and multiply and fill the earth… (9:1)
And God said, “Behold, I have given you every plant yielding seed that is on the face of all the earth, and every tree with seed in its fruit. You shall have them for food. (1:29)
And as I gave you the green plants, I give you everything. (9:3)
In this case, God who blessed after creating blesses after the flood.
Third, the events of the first man and Noah both show it is the LORD who is personally involved in His works of creation. Genesis 2 details how the LORD creates the first man, brings him to the Garden and creates the first woman. The account of Noah displays the same personal involvement while describing personal attributes of the character of the LORD:
Personal Involvement and Accountability
And the LORD regretted that he had made man on the earth, and it grieved him to his heart. So the LORD said, “I will blot out man whom I have created from the face of the land, man and animals and creeping things and birds of the heavens, for I am sorry that I have made them.” (6:6-7)
Personal Savior
But Noah found favor in the eyes of the LORD. (6:8)
Then the LORD said to Noah, “Go into the ark, you and all your household, for I have seen that you are righteous before me in this generation. (7:1)
… And the LORD shut him in. (7:16)
The LORD is described as personally involved, describing personal reasons, and ultimately it is the LORD who personally ensures Noah’s safety by securing the door of the ark.
Conclusion
The different uses of the names demonstrate use based on subject matter and character. The different uses complement one another suggesting a single source. In particular, the personal involvement associated with YHVH is consistent with the rabbinic connection of YHVH with mercy.
1. NET Bible Notes [Note #11]
2. [Torah Philosophy]
3. All Scripture from the English Standard Version