Apex. This is correct because Apex is a programming language that can perform complex logic and manipulate data in Salesforce. Apex can be used to create a trigger on the opportunity object that copies the value of the billing state from the related account record when the opportunity is created, and prevents it from being changed afterwards. The other options are not suitable for this requirement because they either cannot copy data from a related object (formula field, roll-up summary field) or cannot prevent data from being changed (workflow).