Flipping/double closing

Need a little help here:

I have heard many different opinions on this, but is there anything wrong with double closing when you:

Sign a contract on a new house, at ex. 200,000 when is appraises for 270,000 and then sell it to end buyer at 250,000 at closing.

You wouldn’t get a loan yourself, but the end buyer would get a loan pay off the 1st contract with the builder with it, and you make your 50k? Any opinions are appreciated.