My game character gets stuck at the doorway for a few seconds?

some more info on my question. I have created a game for my final project for ICS4U. And in my game, when the game state turns to “HOUSE1F”(when my main character enters a house), I set his X and Y coordinates to the doorway of the house but when I do that, he gets stuck there for like a few seconds and then is able to walk. I wonder why that happens. It also happens when he leaves the house. Thanks.

Dong Class: (Main Character) (Movement Methods)

public void update() {
    xPos += speedX;
    yPos += speedY;
    System.out.println("X: " + xPos);
    System.out.println("Y: " + yPos);
}

public void checkInHouse(int dfN, ICS4UFinalProject ifp, Graphics g) {
    Graphics2D g2d = (Graphics2D) g;
    if (dfN == 1) {
        //House on the Left Top Corner
        if (xPos >= 109 && xPos <= 299) {
            if (yPos >= 43 && yPos <= 163) {
                //hs.setDongInHouseX(hs.getDoorX());
                //hs.setDongInHouseY(hs.getDoorY());
                hs.setDongInHousePos(hs.getDoorX(), hs.getDoorY());
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;

            }
        } else if (xPos >= 1060 && xPos <= 1250) {//House on the Right top corner
            if (yPos >= 43 && yPos <= 163) {
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;
            }
        } else if (xPos >= 107 && xPos <= 297) {//Bottom left corner house
            if (yPos >= 634 && yPos <= 754) {
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;
            }
        } else if (xPos >= 1060 && xPos <= 1250) {//Bottom Right AllHouses
            if (yPos >= 630 && yPos <= 750) {
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;
            }
        }
    } else if (dfN == 2) {
        //House on the Left Top Corner
        if (xPos >= 109 && xPos <= 299) {
            if (yPos >= 43 && yPos <= 163) {
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;
                hs = new AllHouses(ifp, 550, 690, 0, 0);
            }
        }
        //House on the Right top corner
        if (xPos >= 1060 && xPos <= 1250) {
            if (yPos >= 43 && yPos <= 163) {
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;
            }
        }
        //Bottom left corner house
        if (xPos >= 107 && xPos <= 297) {
            if (yPos >= 634 && yPos <= 754) {
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;
            }
        }
        //Bottom Right AllHouses
        if (xPos >= 1060 && xPos <= 1250) {
            if (yPos >= 634 && yPos <= 754) {
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;
            }
        }
        //Middle Center AllHouses
        if (xPos >= 562 && xPos <= 752) {
            if (yPos >= 345 && yPos <= 465) {
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;
            }
        }
    } else if (dfN == 3) {
        //House on the Left Top Corner
        if (xPos >= 109 && xPos <= 299) {
            if (yPos >= 43 && yPos <= 163) {
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;
                hs = new AllHouses(ifp, 550, 690, 0, 0);
            }
        }
        //House on the Right top corner
        if (xPos >= 1060 && xPos <= 1250) {
            if (yPos >= 43 && yPos <= 163) {
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;
            }
        }
        //Bottom left corner house
        if (xPos >= 107 && xPos <= 297) {
            if (yPos >= 634 && yPos <= 754) {
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;
            }
        }
        //Bottom Right AllHouses
        if (xPos >= 1060 && xPos <= 1250) {
            if (yPos >= 634 && yPos <= 754) {
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;
            }
        }
        //Middle Top AllHouses
        if (xPos >= 562 && xPos <= 752) {
            if (yPos >= 45 && yPos <= 165) {
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;
            }
        }
        //Middle Bot AllHouses
        if (xPos >= 562 && xPos <= 752) {
            if (yPos >= 634 && yPos <= 754) {
                ICS4UFinalProject.state = ICS4UFinalProject.STATE.HOUSE1F;
            }
        }
    }
}

Here is my Allhouses class: (Just the movement and methods I think it is important)

public void setInHouseSpeedY(int inHouseSpeedY) {
    this.inHouseSpeedY = inHouseSpeedY;
}

public int getDongInHouseX() {
    return dongInHouseX;
}

public void setDongInHouseX(int dongInHouseX) {
    this.dongInHouseX = dongInHouseX;
}

public int getDongInHouseY() {
    return dongInHouseY;
}

public void setDongInHouseY(int dongInHouseY) {
    this.dongInHouseY = dongInHouseY;
}

public void setDongInHousePos(int x, int y){
    this.dongInHouseX = x;
    this.dongInHouseY = y;
}
public void update() {
    dongInHouseX += inHouseSpeedX;
    dongInHouseY += inHouseSpeedY;
    //System.out.println("X: " + dongInHouseX);
    //System.out.println("Y: " + dongInHouseY);
}

public void checkLeaveHouse(ICS4UFinalProject ifp, Dong dg) {
    if (dongInHouseX >= 600 && dongInHouseX <= 900) {
        if (dongInHouseY >= 720) {
            ICS4UFinalProject.state = ICS4UFinalProject.STATE.GAME;
            //If Dong's position is in the zone of the top left house
            //Set their x and y position to the entrance of the door of the house when they leave
            if(dg.getXPos() >= 7 && dg.getXPos() <= 372){
                if(dg.getYPos() >= 6 && dg.getYPos() <= 190){
                    dg.setXPos(exitXTL);
                    dg.setYPos(exitYTL);
                }
            }
        }
    }
}
public void paintHouseIndoor1F(Graphics g, ICS4UFinalProject ifp) {
    Graphics2D g2d = (Graphics2D) g;
    if (inHouseSpeedX != 0 || inHouseSpeedY != 0) {
        g2d.drawImage(dongMoving, dongInHouseX, dongInHouseY, 200, 200, ifp);
    } else {
        g2d.drawImage(dongIdle, dongInHouseX, dongInHouseY, 200, 200, ifp);
    }
    Font fnt1 = new Font("Comic Sans MS", Font.BOLD, 30);
    g.setFont(fnt1);
    g2d.setColor(Color.BLACK);
    g2d.draw(welcomeMat);
    g2d.drawString("WELCOME", 670, 775);

}