"It is necessary that you do this."
Translation:Bunu senin yapman lazım.
They are the regular possessive endings:
To your second question, since this is now a specific direct object of your main verb, you will usually need to add the accusative case (or another case, depending on the verb). But here, where the main verb is "not a verb" (because this is an is/are/copula sentence), the accusative would be wrong.
I agree with your confusion. I can't find any examples or resources that support moving the object of the gerund verb "yapman" to the outside of the genitive-possessive pair. I am not an expert, by any means, but I am skeptical that this is correct. The grammar texts that I've studied consider this kind of gen-poss-gerund to be a "noun clause" that exists as a unit, which would mean this would have to be "senin bunu yapman" = your doing this.
It seems particularly important to preserve that structure for times when we have a main verb that could (or must) take the accusative.
I love that you do this. = Bunu yapmanı seviyorum.
I love that she does this. = Bunu yapmasını seviyorum.
That results in two accusative-marked objects. If you add the genitive possessor (for clarity, for emphasis, because it is not a pronoun, etc.), it seems it would have to be placed carefully, so that it would be clear which accusative object belonged to the main verb.
Senin bunu yapmanı seviyorum.
(NOT: Bunu senin yapmanı seviyorum.)
Sara'nın bunu yapmasını seviyorum.
(NOT: Bunu Sara'nın yapmasını seviyorum.)
Maybe I am being too strict in my interpretation, so I hope we can get the attention of someone who can clarify this for us!
EDITED to add:
In the comments on "You need to listen to this." = Senin bunu dinlemen lazım., a mod confirmed that you could not rephrase it as "Bunu senin dinlemen lazım":
View "Senin bunu dinlemen" as a mini sentence within itself. The "verb" (which has become a noun) is at the end and its object comes right before it (and after the subject).
[typos corrected for clarity]