Answer: “in the Spirit.”
In Rom. 8:9, it is written,
But you are not in the flesh but in the Spirit, if indeed the Spirit of God dwells in you. Now if anyone does not have the Spirit of Christ, he is not His. NKJV, ©1982
ὑμεῖς δὲ οὐκ ἐστὲ ἐν σαρκὶ ἀλλ᾽ ἐν πνεύματι εἴπερ πνεῦμα θεοῦ οἰκεῖ ἐν ὑμῖν TR, 1550
The apostle Paul clearly states that one is in the Spirit if the Spirit of God (Holy Spirit)1 dwells in them. Notice the repetition of ἐν—“in”—which would be nonsensical if it were to be translated as “by.”
1 The “Spirit of God” is the “Holy Spirit”; 1 Cor. 6:19 cf. 1 Cor. 3:16
Again, for a person to be “in the Spirit” means the Holy Spirit dwells in the person, and the person has the Holy Spirit. But, doesn’t this seem backwards? If the Holy Spirit dwells in a person, shouldn’t it be said that the Holy Spirit is in the person rather than the person in the Holy Spirit?
The Lord Jesus Christ explained how this process operates.
“I am in the Father, and the Father is in me”...“but the Father who dwells2 in me”
ἐγὼ ἐν τῷ πατρὶ καὶ ὁ πατὴρ ἐν ἐμοί ἐστιν...ὁ δὲ πατὴρ ὁ ἐν ἐμοὶ μένων
3 Some translations translate the verb μένω as “to abide.” This word is not commonly used in modern English, but in this context, it means “to dwell.” According to the Oxford English Dictionary on the verb “abide,” 9.: Of a person: to stay habitually in a place; to remain in residence; to reside, dwell. Now somewhat archaic.
In other words, when X dwells in Y, then Y is in X, and X is in Y. By analogy, if the Holy Spirit dwells in a person, the person is in the Holy Spirit, and the Holy Spirit is in the person.
...“If a man love me, he will keep my words, and my Father will love him, and we will come to him, and we will make our home with him.”
...Ἐάν τις ἀγαπᾷ με τὸν λόγον μου τηρήσει καὶ ὁ πατήρ μου ἀγαπήσει αὐτόν καὶ πρὸς αὐτὸν ἐλευσόμεθα καὶ μονὴν παρ᾽ αὐτῷ ποιησόμεν
“...just as You, Father, are in me, and I in you, that they may also be one in us...”
...καθὼς σύ πάτερ ἐν ἐμοὶ κἀγὼ ἐν σοί ἵνα καὶ αὐτοὶ ἐν ἡμῖν ἓν ὦσιν...
Christians are in the Father and in the Son, just as the Son and the Father are in Christians. This is accomplished by means of the Holy Spirit, “for he who is joined to the Lord is one spirit.”3
3 1 Cor. 6:17
1 John 3:24
Now he who keeps His commandments dwells in Him, and He [dwells] in him. And by this we know that He dwells in us, by the Spirit whom He has given us.
καὶ ὁ τηρῶν τὰς ἐντολὰς αὐτοῦ ἐν αὐτῷ μένει καὶ αὐτὸς ἐν αὐτῷ· καὶ ἐν τούτῳ γινώσκομεν ὅτι μένει ἐν ἡμῖν ἐκ τοῦ πνεύματος οὗ ἡμῖν ἔδωκεν
1 John 4:13
By this we know that we dwell in Him, and He in us, because He has given us of His Spirit.
Ἐν τούτῳ γινώσκομεν ὅτι ἐν αὐτῷ μένομεν καὶ αὐτὸς ἐν ἡμῖν ὅτι ἐκ τοῦ πνεύματος αὐτοῦ δέδωκεν ἡμῖν
In summary, to be “in the Spirit” means for the Holy Spirit to dwell in a Christian. When the Holy Spirit dwells in a Christian, the Father and Son also dwell in the Christian, and the Christian dwells in the Father and the Son (as well as in the Holy Spirit).
The Christian has the Holy Spirit, as well as having the Father and the Son.4 The Christian is in the Father, the Son, and the [Holy] Spirit; likewise, the Father, the Son, and the Holy Spirit are in the Christian.
When a Christian is “in the [Holy] Spirit,” the Holy Spirit is in the Christian. The Holy Spirit guides the Christian into all truth,5 and thus, the Christian is “led by the Spirit”6 as they “walk in the Spirit”7 and “live in the Spirit.”8
4 2 John 1:9
5 John 16:13
6 Rom. 8:14; Gal. 5:18
7 Gal. 5:16, 5:25
8 Gal. 5:25
On the meaning of “walking in the Spirit,” note the words of Rev. Lewis O. Thompson,9
Life and walk are not synonyms, as some have taught, although both proceed from the same source. Life relates to what is inward; walk, to what is outward.
II. To live in the Spirit.
1. The Spirit begins the life of God in the soul. You hath He quickened who were dead in trespasses and sins.
2. The Spirit gives new desires, and changes all the motives of life. What He desires we desire; what He loves we love; what He hates we hate.
3. The Spirit lives in us. He fills the soul with a heavenly atmosphere. He sheds abroad a holy influence.
III. To walk in the Spirit.
1. The walk will follow from the life, for every kind of life is after its own kind and development. Spiritual life manifests itself by a spiritual walk.
2. Every outward manifestation will correspond to the inward principle of life, and will be marked by love to God and love to man. What is true, just, honest, pure and lovely, will characterize this walk.
3. Reputation will correspond to character, and conduct to life; for he that lives [in] the Spirit will mortify the deeds of the body, and avoid whatsoever are base, false, selfish and sinful.
IV. To bed led by the Spirit.
1. The Christian is not perfect. His life is a growth, his walk a progress; but he is led and guided by the Holy Spirit.
9 p. 42-43
Thompson, Lewis O. “Life and Walk in the Spirit. (Gal. v:25.).” The Preacher and Homiletic Monthly. Vol. 6. Ed. Funk, I. K. New York: Funk & Wagnalls, 1882.