i'm trying to highlight the word if i hover over it, however as you can see the x+ypos that i put in the drawingArea.text is different from the normal x+ypos that is not in the drawing area, thus i want to find away to declare this x+ypos as drawingArea variable.
I'm slightly perplexed by your code... it isn't valid and will fail compilation... also, if you're reassigning x to be zero every time display() is called, then why must it be declared for the PGraphics?
Aside from my remarks about your code, let's go back to the original purpose of this:
i'm trying to highlight the word if i hover over it
The text is displayed inside the PGraphics... do you really need this variable to belong to the PGraphics? Do you really need the PGraphics in the first place? Could you clarify the end goal of this that you have in mind?
"i did not put the whole code as it's too big." Sometime, it is worth doing a simple, minimalistic sketch illustrating exactly your problem. A simple setup(), a simple wrapper class handling your PGraphics, drawing it on the sketch, trying to test the mouse over. It gives a solid foundation to give an answer that you can then adapt to your complex sketch. Right now, we have to give generic, vague answers since we have nothing concrete to point at.
Indeed, your wrapper class should know its offset with regard to the top-left corner of the sketch, so it can subtract this offset from mouseX and mouseY. So the part that draws the image must also update this offset (the position of the PGraphics drawing) in the class.