The simplest solution is trigger collider OnEnter and OnExit.
The other way is NavMesh Raycast or SamplePosition, onHit it will contain area info to tweak speed.
Area mask 0x08 in decimal equals to 8, its Area 4th by index, but we count from zero so its area cost is agent.GetAreaCost(3). Mask shows 1 in binary form to denote area index
public static int IndexFromMask(int mask)
{
for (int i = 0; i < 32; ++i)
{
if ((1 << i & mask) != 0)
{
return i;
}
}
return -1;
}