Here is the item again:
At the hour Javier was supposed to be in trigonometry, he was instead flirting
with pretty girls in the cafeteria needless
to say, he was inadequately prepared to make the 98 that he needed on the
final exam to pass the course.
He was instead flirting with pretty girls in the cafeteria is the first main clause. Needless to say, an introductory transition, begins the second main clause, he was inadequately prepared .... These two main clauses run together with no break, causing a fused sentence.
A period after cafeteria and a capital N for needless would fix the problem nicely.