How two vlan are configured on same switch port?

You can configure data and voice vlan on the same port. You can’t configure the two access vlans on single port. When you configure the data & voice vlan on single port in that scenario. From the switch port first cable goes to voip phone. VOIP phone has two port one for the input and other port for connecting to computer.

Below are the steps to configure voice and data vlans on single port

SwitchA(config)#interface range fastethernet 0/10 – 12
SwitchA(config-if)#switchport mode access
SwitchA(config-if)#Switchport access vlan 20
SwitchA(config-if)#switchport voice vlan 5