(B) first train it using the data.
Before an AI model can predict any output, it must be trained on data so it can learn patterns and relationships from examples.
The passage clearly states that under the learning-based approach, the AI model "gets trained on the data fed to it and then is able to design a model." Training always precedes testing/prediction. Testing (option A) comes after training to check accuracy — so "both A and B" is incorrect because training must happen first. The correct sequence is: train → then predict/test.