To change the pin mode to Analog you have to set the HSIOM_SEL0[3:0] directly to AMUXBUSA or AMUXBUSB. You don't need to use GPIO mode in between. Please refer corresponding port's HSIOM_SEL0 bit definitions in the register TRM of PSoC 4200. For example please refer page number 185 of the architecture TRM.
After changing the pin to analog mode you have to disable the input buffer of the pin. For this please refer to the register PRT_PCx register.
It is not possible to connect the pins to 5V unless the VDDIO is 5V. If VDDIO is 5 volts you can connect the pin to 5V. These are the following steps:
1. Change the HSIOM_SEL0 of the pin to GPIO.
2. Change the drive mode of the pin to Resistive pull-up.
3. Write 1 to the pin.