There are two issues here and Gerard's answer is only partially correct.
He is correct to say that you need to create two resource calendars, one
defining the work hours for the 5 day a week people and the other for
the 6 day a week people - you absolutely need to do that. But when you
enter the task duration estimate initially you will need to use days
instead of weeks the entries. The reason is that Project actually
stores duration in minutes. The entries on the Calendar Options page
(Tools, Options menu) for "Hours per Day" and "Hours per Week" are the
values used for the conversion factors from what you enter and what is
stored in the database and this happens before the resources are
assigned and it knows what calendar to apply. So with the default
settings, when you type in a duration as "2 weeks" Project converts that
to 2*40*60=4800 minutes and that is what stored in the database. Then
when you assign resources it looks at the resource calendars to see
which minutes thru the day count towards that 4800 minute duration.
Lets say it begins Monday 8am and people work either 8 hours per day 5
days a week or 8 hours a day 6 days a week. At 8 hours per day, each
group's workday will account for 480 minutes. If someone from the first
group is assigned it will show "2 weeks" task starting Mon at 8 and
finishing a week from Fri at 5pm. If you assign the same 2 week task to
someone in the 2nd group, it will show the task beginning Mon at 8am and
finishing a week from THURSDAY at 5pm, the day before it would finish
with the other group.
If it's any consolation, you probably should be breaking down your tasks
into smaller units anyway. Tasks that have durations more than about 2
weeks usually are too large to effectively manage and should be broken
down into smaller components.