How to decide which part is a subject and which a predicate?
我 - I (subject)
这两天 - these two days (relative phrase- stating the duration of the event)
住 - stay (verb)
(得) - (verb particle, to indicate the result or degree )
很愉快 - very happy (resultive phrase, describe the result of the verb 住 )


"我" is the subject; "住得很愉快" is the predicate

~~~~


(的) - (adjectival suffix, indicate the phrase it followed is an description of the following noun)
"这两天住(的)" should be followed by a noun, e.g. 地方, as in 这两天住(的)地方 (the place I lived in these two days)


这两天住(的)很愉快 is grammatically incorrect. Either it misspoken 得 as 的, or mistakenly used an adjective instead of a noun after the adjectival suffix "的"

*Another possibility is, the noun and the verb in an relative clause are omitted. 这两天住的(地方)很(令人)愉快

Another example:

我|玩|得|很高興 - (I played and I was very happy)

我(subject)|玩(verb)|得(verb particle)|很高興(resultive phrase)