JSFiddle - React, Tailwind, and code Playground
HTML
<input id="in" type="text"/><button id="b">Transform</button><br>
<textarea id="out"></textarea>
JavaScript
var doit = i=>(r=/(you|s?he|it?|we|they)( \S+) ([^\.!?]+)/i.exec(i))?(c=(a,b)=>a[`to${['Low','Upp'][b]}erCase`]())(r[3].slice(0,1),1)+r[3].slice(1)+", "+c(r[1],+(/i/i.test(r[1])))+r[2]+".":"Too difficult, this sentence is.";
document.getElementById("b").onclick = function() {
document.getElementById("out").value =
doit(document.getElementById("in").value);
}