It is known that lane-changing maneuvers cause traffic disruption and result in shockwave formation and propagation. The introduction of connected automated vehicles (CAV) provides the opportunity to coordinate the vehicle movements during the lane-changing maneuver to deal with this issue. Accordingly, this paper proposes an approach to jointly optimize the lateral trajectory of a lane-changing CAV and the longitudinal control of an impacted CAV in the target lane. Towards this objective: i) we first design a model predictive controller (MPC) for the vehicle in the target lane to properly respond to a discretionary lane-changing maneuver; ii) we then specify a set of possible lateral trajectories that may be adopted by the lane-changing vehicle; iii) we then compute the required deceleration of the vehicle directly impacted by the lane-changing based on the estimated set of the lateral trajectories; iv) we finally choose the trajectory that minimizes the total deceleration effort (i.e., minimizes the disturbance in the platoon of vehicles). Analytical and simulation-based investigations are performed to assess the capability of the proposed approach in minimizing the acceleration disturbance and shockwave magnitude.