The answer depends on (1) your confidence in the stability of the plan and (2) your available time to create and refine the plan and (3) how far in the future the work activities will occur and (4) if the work is on your project's critical chain of activities.
If you have the time and are confident that the plan is stable, then create a separate task and use either a finish-to-start relationship or a finish-to-finish relationship.
If you don't have a lot of time, but these tasks are on the critical chain of your project, then it might be a good idea to put in the detail so that your resource plan is valid.
If you aren't confident in the stability of the plan and the activities won't happen for a while, then consider creating a placeholder task C that is duration A + B and uses both resources. When you get close to performing the work (2-4 weeks in advance) and there is less uncertainty, then replace C with A and B. This approach will help minimize the wasted effort of re-planning, especially important if re-planning will involve participation from the team and take them away from doing the work.