"is there a way to do an instant delete on this lines???"
No.
This reverse-engineering, trying to make the database consistent again because B contains orphaned data that nolonger has a relation to A.
This is what PK/FK relations were invented for. If you use PostgreSQL/oracle (well basically any database except MySQL) you can define and enforce PK/FK relations with casscading delete. Then when you delete an element from A, all corresponding elements from B are deleted automatically.
MySQL sucks, and I don't say that without good reason. 🙂
A forum, a FAQ, email notification, what else do you need?