How I understand it chlorine turns into HOCI when combined with cya.
I think you are getting some things muddled up there. Let's take a step back. I will use quotes in my answers from the chemistry thread that Marty was mentioning so you can dive deeper if you wish to.
HOCl gets created when chlorine is added to water. Here is the reaction for adding bleach:
Adding Chlorine
NaOCl + H2O --> Na+ + HOCl + OH- (+ extra base Na+ + OH-)
HOCl --> H+ + OCl-
HOCl is then in a pH-dependant equilibrium with hypochlorite ion (OCl-), second equation above.
When adding CYA into the game, things are getting more complicated, there are a number of chemical reactions between multiple different molecules going back and forth (literally going back and forth, these are so called equilibrium reactions).
This is the dominating reaction where CYA and HOCl are involved:
HClCY- + H2O <--> H2CY- + HOCl
"Chlorine bound to CYA" + Water <--> "CYA ion" + Hypochlorous Acid
A bloke called O'Brien and his mates published in 1975 a paper with all the involved equations and the equilibrium constants (derived from many experiments), that are required to use the equations to calculate the HOCl concentration resulting from a given combination of FC, CYA and pH. This is a set of equations that need simultaneous solving, that is really only possible using numerical methods. Chem Geek had put together an Excel spreadsheet to do all the calculations presented in his Deep End chemistry thread.
The essence of all of that is compiled in this simplified solution (involving a number of approximations):
HOCl is approximately 0.3 * FC / CYA
The above approximation isn't terribly far off from the accurate calculation. At an FC of 3.5 ppm and a CYA of 30 ppm, the actual HOCl is 0.051 ppm while the above approximation gives 0.035 ppm. You can see where the FC/CYA ratio comes from -- it is a direct result of the chemical equilibrium between chlorine attached to CYA vs. separate chlorine and CYA.
This should be enough to give you an idea where this all comes from.
If you want to dive deeper then go through the whole thread that Marty was referring to, and where my quotes come from.
You can find the O'Brien paper and Chem Geek's Pool Equations spreadsheet via the forum search.