2022 taxes

We will be unable to file our 2022 taxes on time as we will be away and arriving back on April 19th, how to file for an extension. We also sold our summer house to our oldest son and know we will have to pay capital gains after off setting with the improvements. Do we have send the capital gains prior to filing or how do we handle this part. We live in Florida and do not need to file any State taxes. The summer house was located in North Carolina.