Are these sentences correct German, and do they mean the same thing?
Ich habe dir schwer zu schaffen gemacht.
From DWDS: umgangssprachlich ⟨etw., jmd. macht jmdm. zu schaffen⟩etw., jmd. verursacht jmdm. Schwierigkeiten, Mühe, Sorgen:
Ich habe es gemacht, dir schwer zu schaffen.
or
Ich habe es dir schwer gemacht.
Are there reasons to prefer any?